home *** CD-ROM | disk | FTP | other *** search
Unknown | 1997-08-02 | 15.3 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 90 01 00 00 5c 02 00 00 | 0d 03 00 00 b6 04 00 00 |....\...|........|
|00000010| c7 06 00 00 f9 07 00 00 | 32 0a 00 00 1d 0c 00 00 |........|2.......|
|00000020| 40 0d 00 00 93 0e 00 00 | 89 0f 00 00 d0 10 00 00 |@.......|........|
|00000030| 0d 12 00 00 6e 15 00 00 | 57 16 00 00 68 17 00 00 |....n...|W...h...|
|00000040| 81 18 00 00 6c 19 00 00 | e8 1a 00 00 9a 1c 00 00 |....l...|........|
|00000050| 79 1d 00 00 5d 1e 00 00 | 64 1f 00 00 5a 20 00 00 |y...]...|d...Z ..|
|00000060| 34 21 00 00 e8 21 00 00 | f3 22 00 00 4c 24 00 00 |4!...!..|."..L$..|
|00000070| 28 25 00 00 f7 25 00 00 | 43 27 00 00 bd 27 00 00 |(%...%..|C'...'..|
|00000080| 29 29 00 00 a6 29 00 00 | 4d 2a 00 00 4e 2b 00 00 |))...)..|M*..N+..|
|00000090| 01 2c 00 00 ea 2c 00 00 | 0c 2e 00 00 28 2f 00 00 |.,...,..|....(/..|
|000000a0| 61 30 00 00 32 31 00 00 | 07 32 00 00 77 33 00 00 |a0..21..|.2..w3..|
|000000b0| b2 34 00 00 77 35 00 00 | 17 36 00 00 bf 36 00 00 |.4..w5..|.6...6..|
|000000c0| 07 38 00 00 03 39 00 00 | 1a 3a 00 00 e2 3a 00 00 |.8...9..|.:...:..|
|000000d0| 97 3b 00 00 59 3c 00 00 | 56 3d 00 00 00 00 00 00 |.;..Y<..|V=......|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 20 20 4c 6f 61 64 5f 66 | 6f 6e 74 28 29 20 6a 75 | Load_f|ont() ju|
|000001a0| 73 74 20 74 61 6b 65 73 | 20 74 68 65 20 66 69 6c |st takes| the fil|
|000001b0| 65 20 6e 61 6d 65 20 6f | 66 20 74 68 65 20 66 6e |e name o|f the fn|
|000001c0| 74 20 61 6e 64 20 77 68 | 61 74 20 62 61 6e 6b 20 |t and wh|at bank |
|000001d0| 28 30 20 6f 72 20 31 29 | 0d 0a 74 6f 20 70 75 74 |(0 or 1)|..to put|
|000001e0| 20 69 74 20 69 6e 2e 0d | 0a 20 20 20 0d 0a 45 78 | it in..|. ..Ex|
|000001f0| 61 6d 70 6c 65 2e 0d 0a | 20 20 20 0d 0a 20 20 20 |ample...| .. |
|00000200| 6c 6f 61 64 5f 66 6f 6e | 74 28 22 69 62 6d 73 74 |load_fon|t("ibmst|
|00000210| 64 2e 66 6e 74 22 2c 31 | 29 3b 0d 0a 20 20 20 0d |d.fnt",1|);.. .|
|00000220| 0a 20 20 20 54 68 69 73 | 20 6c 6f 61 64 73 20 74 |. This| loads t|
|00000230| 68 65 20 73 74 61 6e 64 | 61 72 64 20 49 42 4d 20 |he stand|ard IBM |
|00000240| 66 6f 6e 74 20 69 6e 20 | 74 6f 20 74 68 65 20 75 |font in |to the u|
|00000250| 70 70 65 72 20 62 61 6e | 6b 2e 0d 0a 20 20 45 6e |pper ban|k... En|
|00000260| 61 62 6c 65 5f 64 6f 75 | 62 6c 65 5f 66 6f 6e 74 |able_dou|ble_font|
|00000270| 28 29 20 74 75 72 6e 73 | 20 74 68 65 20 64 75 61 |() turns| the dua|
|00000280| 6c 20 66 6f 6e 74 20 6d | 6f 64 65 20 6f 6e 20 61 |l font m|ode on a|
|00000290| 6e 64 20 6f 66 66 2e 20 | 30 20 69 73 20 6f 66 66 |nd off. |0 is off|
|000002a0| 20 61 6e 64 0d 0a 31 20 | 69 73 20 6f 6e 2e 0d 0a | and..1 |is on...|
|000002b0| 20 20 20 20 0d 0a 45 78 | 61 6d 70 6c 65 3a 0d 0a | ..Ex|ample:..|
|000002c0| 20 20 20 20 0d 0a 20 20 | 20 65 6e 61 62 6c 65 5f | .. | enable_|
|000002d0| 64 6f 75 62 6c 65 5f 66 | 6f 6e 74 28 31 29 3b 0d |double_f|ont(1);.|
|000002e0| 0a 20 20 20 20 0d 0a 20 | 20 20 54 68 69 73 20 74 |. .. | This t|
|000002f0| 75 72 6e 73 20 74 68 65 | 20 64 75 61 6c 20 66 6f |urns the| dual fo|
|00000300| 6e 74 20 6d 6f 64 65 20 | 6f 6e 2e 0d 0a 20 20 57 |nt mode |on... W|
|00000310| 72 69 74 65 5f 77 69 6e | 5f 62 61 6e 6b 28 29 20 |rite_win|_bank() |
|00000320| 68 61 73 20 74 68 72 65 | 65 20 70 61 72 61 6d 65 |has thre|e parame|
|00000330| 74 65 72 73 20 61 6e 64 | 20 61 20 66 6f 72 6d 61 |ters and| a forma|
|00000340| 74 65 64 20 61 72 67 75 | 6d 65 6e 74 2e 20 54 68 |ted argu|ment. Th|
|00000350| 65 20 66 69 72 73 74 0d | 0a 70 61 72 61 6d 65 74 |e first.|.paramet|
|00000360| 65 72 20 69 73 20 74 68 | 65 20 62 61 6e 6b 20 74 |er is th|e bank t|
|00000370| 6f 20 75 73 65 2e 20 30 | 20 69 73 20 74 68 65 20 |o use. 0| is the |
|00000380| 6c 6f 77 20 62 61 6e 6b | 20 61 6e 64 20 31 20 69 |low bank| and 1 i|
|00000390| 73 20 74 68 65 20 68 69 | 67 68 20 62 61 6e 6b 2e |s the hi|gh bank.|
|000003a0| 0d 0a 74 68 65 20 6e 65 | 78 74 20 74 77 6f 20 61 |..the ne|xt two a|
|000003b0| 72 65 20 74 68 65 20 58 | 20 61 6e 64 20 59 20 63 |re the X| and Y c|
|000003c0| 6f 6f 72 64 69 6e 61 74 | 65 73 20 69 6e 20 74 68 |oordinat|es in th|
|000003d0| 65 20 63 75 72 72 65 6e | 74 20 77 69 6e 64 6f 77 |e curren|t window|
|000003e0| 2e 20 54 68 65 20 0d 0a | 66 6f 72 6d 61 74 65 64 |. The ..|formated|
|000003f0| 20 61 72 67 75 6d 65 6e | 74 20 69 73 20 74 68 65 | argumen|t is the|
|00000400| 20 73 61 6d 65 20 61 73 | 20 70 72 69 6e 74 66 28 | same as| printf(|
|00000410| 29 2e 0d 0a 20 20 20 20 | 0d 0a 45 78 61 6d 70 6c |)... |..Exampl|
|00000420| 65 3a 0d 0a 20 20 20 20 | 20 0d 0a 20 20 77 72 69 |e:.. | .. wri|
|00000430| 74 65 5f 77 69 6e 5f 62 | 61 6e 6b 28 30 2c 33 2c |te_win_b|ank(0,3,|
|00000440| 35 2c 22 53 6d 70 6c 79 | 20 53 6f 66 74 22 29 3b |5,"Smply| Soft");|
|00000450| 0d 0a 20 20 20 0d 0a 20 | 20 54 68 69 73 20 64 69 |.. .. | This di|
|00000460| 73 70 6c 61 79 73 20 53 | 69 6d 70 6c 79 20 53 6f |splays S|imply So|
|00000470| 66 74 20 61 74 20 74 68 | 65 20 63 6f 6f 72 64 69 |ft at th|e coordi|
|00000480| 6e 61 74 65 73 20 69 6e | 20 74 68 65 20 63 75 72 |nates in| the cur|
|00000490| 72 65 6e 74 20 77 69 6e | 64 6f 77 20 69 6e 20 74 |rent win|dow in t|
|000004a0| 68 65 0d 0a 20 20 6c 6f | 77 20 62 61 6e 6b 20 66 |he.. lo|w bank f|
|000004b0| 6f 6e 74 2e 0d 0a 20 20 | 57 72 69 74 65 5f 77 69 |ont... |Write_wi|
|000004c0| 6e 5f 6d 75 6c 74 69 28 | 29 20 73 65 6c 65 63 74 |n_multi(|) select|
|000004d0| 73 20 31 20 6f 66 20 66 | 6f 72 20 73 70 65 63 69 |s 1 of f|or speci|
|000004e0| 61 6c 20 66 6f 6e 74 73 | 20 6d 61 64 65 20 77 69 |al fonts| made wi|
|000004f0| 74 68 20 6d 61 6b 65 66 | 6f 6e 74 2e 65 78 65 2e |th makef|ont.exe.|
|00000500| 0d 0a 49 74 20 69 73 20 | 74 68 65 20 73 61 6d 65 |..It is |the same|
|00000510| 20 61 73 20 77 72 69 74 | 65 5f 77 69 6e 5f 62 61 | as writ|e_win_ba|
|00000520| 6e 6b 28 29 20 65 78 63 | 65 70 74 20 69 6e 73 74 |nk() exc|ept inst|
|00000530| 65 61 64 20 6f 66 20 74 | 68 65 20 62 61 6e 6b 20 |ead of t|he bank |
|00000540| 74 68 65 20 6e 75 6d 62 | 65 72 0d 0a 6f 66 20 74 |the numb|er..of t|
|00000550| 68 65 20 66 6f 6e 74 20 | 69 73 20 63 61 6c 6c 65 |he font |is calle|
|00000560| 64 2e 20 46 6f 6e 74 20 | 31 20 61 6e 64 20 32 20 |d. Font |1 and 2 |
|00000570| 61 72 65 20 69 6e 20 74 | 68 65 20 6c 6f 77 20 62 |are in t|he low b|
|00000580| 61 6e 6b 20 61 6e 64 20 | 66 6f 6e 74 20 33 20 61 |ank and |font 3 a|
|00000590| 6e 64 20 34 0d 0a 61 72 | 65 20 69 6e 20 74 68 65 |nd 4..ar|e in the|
|000005a0| 20 68 69 67 68 20 62 61 | 6e 6b 2e 20 45 74 68 65 | high ba|nk. Ethe|
|000005b0| 72 20 62 61 6e 6b 20 6f | 72 20 62 6f 74 68 20 63 |r bank o|r both c|
|000005c0| 61 6e 20 62 65 20 6c 6f | 61 64 65 64 20 62 75 74 |an be lo|aded but|
|000005d0| 20 74 68 65 20 66 75 6e | 63 74 69 6f 6e 0d 0a 77 | the fun|ction..w|
|000005e0| 69 6c 6c 20 6f 6e 6c 79 | 20 77 6f 72 6b 20 6f 6e |ill only| work on|
|000005f0| 20 73 70 65 63 69 61 6c | 20 66 6f 6e 74 73 2e 0d | special| fonts..|
|00000600| 0a 20 20 20 20 0d 0a 45 | 78 61 6d 70 6c 65 3a 0d |. ..E|xample:.|
|00000610| 0a 20 20 20 0d 0a 20 20 | 6c 6f 61 64 5f 66 6f 6e |. .. |load_fon|
|00000620| 74 28 22 66 64 65 6d 6f | 31 2e 66 6e 74 22 2c 31 |t("fdemo|1.fnt",1|
|00000630| 29 3b 0d 0a 20 20 77 72 | 69 74 65 5f 77 69 6e 5f |);.. wr|ite_win_|
|00000640| 6d 75 6c 74 69 28 34 2c | 33 2c 35 2c 22 53 69 6d |multi(4,|3,5,"Sim|
|00000650| 70 6c 79 20 53 6f 66 74 | 22 29 3b 0d 0a 20 20 20 |ply Soft|");.. |
|00000660| 0d 0a 20 20 54 68 69 73 | 20 6c 6f 61 64 73 20 74 |.. This| loads t|
|00000670| 68 65 20 73 70 65 63 69 | 61 6c 20 66 6f 6e 74 20 |he speci|al font |
|00000680| 61 6e 64 20 64 69 73 70 | 6c 61 79 73 20 53 69 6d |and disp|lays Sim|
|00000690| 70 6c 79 20 53 6f 66 74 | 20 61 74 20 74 68 65 20 |ply Soft| at the |
|000006a0| 63 6f 6f 72 64 69 6e 61 | 74 65 73 0d 0a 20 20 69 |coordina|tes.. i|
|000006b0| 6e 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 77 69 |n the cu|rrent wi|
|000006c0| 6e 64 6f 77 2e 0d 0a 20 | 20 4c 6f 61 64 5f 65 6d |ndow... | Load_em|
|000006d0| 75 6c 61 74 65 28 29 20 | 6c 6f 61 64 73 20 74 68 |ulate() |loads th|
|000006e0| 65 20 67 72 61 70 68 69 | 63 20 65 6d 75 6c 61 74 |e graphi|c emulat|
|000006f0| 69 6f 6e 20 63 68 61 72 | 61 63 74 65 72 73 20 69 |ion char|acters i|
|00000700| 6e 20 74 68 65 20 73 65 | 6c 65 63 74 65 64 0d 0a |n the se|lected..|
|00000710| 62 61 6e 6b 2e 20 49 74 | 20 75 73 65 73 20 74 68 |bank. It| uses th|
|00000720| 65 20 62 6c 65 6e 64 20 | 63 68 61 72 61 63 74 65 |e blend |characte|
|00000730| 72 73 20 43 30 20 74 68 | 75 72 20 43 46 20 73 6f |rs C0 th|ur CF so|
|00000740| 20 61 6c 6c 20 6c 69 6e | 65 20 64 72 61 77 73 20 | all lin|e draws |
|00000750| 61 6e 64 0d 0a 62 6f 61 | 72 64 65 72 73 20 6d 75 |and..boa|rders mu|
|00000760| 73 74 20 75 73 65 20 74 | 68 65 20 63 68 61 72 61 |st use t|he chara|
|00000770| 63 74 65 72 73 20 66 72 | 6f 6d 20 74 68 65 20 6f |cters fr|om the o|
|00000780| 74 68 65 72 20 62 61 6e | 6b 2e 0d 0a 20 20 20 0d |ther ban|k... .|
|00000790| 0a 45 78 61 6d 70 6c 65 | 3a 0d 0a 20 20 20 0d 0a |.Example|:.. ..|
|000007a0| 20 20 6c 6f 61 64 5f 65 | 6d 75 6c 61 74 65 28 31 | load_e|mulate(1|
|000007b0| 29 3b 0d 0a 20 20 20 0d | 0a 20 20 54 68 69 73 20 |);.. .|. This |
|000007c0| 6c 6f 61 64 65 64 20 74 | 68 65 20 67 72 61 70 68 |loaded t|he graph|
|000007d0| 69 63 20 65 6d 75 6c 61 | 74 65 20 63 68 61 72 61 |ic emula|te chara|
|000007e0| 63 74 65 72 73 20 69 6e | 20 74 68 65 20 68 69 67 |cters in| the hig|
|000007f0| 68 20 62 61 6e 6b 2e 0d | 0a 20 20 57 72 69 74 65 |h bank..|. Write|
|00000800| 5f 77 69 6e 5f 6c 61 72 | 67 65 28 29 20 69 73 20 |_win_lar|ge() is |
|00000810| 74 68 65 20 73 61 6d 65 | 20 61 73 20 77 72 69 74 |the same| as writ|
|00000820| 65 5f 77 69 6e 5f 62 61 | 6e 6b 20 62 75 74 20 75 |e_win_ba|nk but u|
|00000830| 73 65 20 74 68 65 20 67 | 72 61 70 68 69 63 0d 0a |se the g|raphic..|
|00000840| 65 6d 75 6c 61 74 69 6f | 6e 20 63 68 61 72 61 63 |emulatio|n charac|
|00000850| 74 65 72 73 20 61 6e 64 | 20 74 68 65 20 62 69 74 |ters and| the bit|
|00000860| 20 6d 61 70 20 6f 66 20 | 74 68 65 20 66 6f 6e 74 | map of |the font|
|00000870| 20 69 6e 20 74 68 65 20 | 62 61 6e 6b 20 63 61 6c | in the |bank cal|
|00000880| 6c 65 64 20 74 6f 0d 0a | 64 69 73 70 6c 61 79 20 |led to..|display |
|00000890| 6c 61 72 67 65 20 28 34 | 78 38 20 63 68 61 72 61 |large (4|x8 chara|
|000008a0| 63 74 65 72 73 29 20 63 | 68 61 72 61 63 74 65 72 |cters) c|haracter|
|000008b0| 73 20 61 6e 64 20 63 61 | 6e 20 62 65 20 75 73 65 |s and ca|n be use|
|000008c0| 64 20 77 69 74 68 20 73 | 74 61 6e 64 61 72 64 0d |d with s|tandard.|
|000008d0| 0a 73 69 7a 65 20 63 68 | 61 72 61 63 74 65 72 73 |.size ch|aracters|
|000008e0| 2e 20 54 68 65 20 58 2c | 59 20 63 6f 6f 72 64 69 |. The X,|Y coordi|
|000008f0| 6e 61 74 65 73 20 61 72 | 65 20 66 6f 72 20 74 68 |nates ar|e for th|
|00000900| 65 20 75 70 70 65 72 20 | 6c 65 66 74 20 63 6f 72 |e upper |left cor|
|00000910| 6e 65 72 20 6f 66 20 74 | 68 65 0d 0a 64 69 73 70 |ner of t|he..disp|
|00000920| 6c 61 79 2e 20 4e 6f 74 | 65 3a 20 65 61 63 68 20 |lay. Not|e: each |
|00000930| 63 68 61 72 61 63 74 65 | 72 20 69 73 20 34 20 63 |characte|r is 4 c|
|00000940| 68 61 72 61 63 74 65 72 | 73 20 77 69 64 65 20 61 |haracter|s wide a|
|00000950| 6e 64 20 38 20 63 68 61 | 72 61 63 74 65 72 73 20 |nd 8 cha|racters |
|00000960| 74 61 6c 6c 2e 0d 0a 20 | 20 0d 0a 45 78 61 6d 70 |tall... | ..Examp|
|00000970| 6c 65 3a 0d 0a 20 20 20 | 0d 0a 20 20 6c 6f 61 64 |le:.. |.. load|
|00000980| 5f 65 6d 75 6c 61 74 65 | 28 31 29 3b 0d 0a 20 20 |_emulate|(1);.. |
|00000990| 77 72 69 74 65 5f 77 69 | 6e 5f 6c 61 72 67 65 28 |write_wi|n_large(|
|000009a0| 31 2c 33 2c 35 2c 22 53 | 69 6d 70 6c 79 20 53 6f |1,3,5,"S|imply So|
|000009b0| 66 74 22 29 3b 0d 0a 20 | 20 0d 0a 20 20 54 68 69 |ft");.. | .. Thi|
|000009c0| 73 20 77 69 6c 6c 20 64 | 69 73 70 6c 61 79 20 53 |s will d|isplay S|
|000009d0| 69 6d 70 6c 79 20 53 6f | 66 74 20 69 6e 20 74 68 |imply So|ft in th|
|000009e0| 65 20 6c 61 72 67 65 20 | 73 74 79 6c 65 20 6f 66 |e large |style of|
|000009f0| 20 74 68 65 20 68 69 67 | 68 20 62 61 6e 6b 20 66 | the hig|h bank f|
|00000a00| 6f 6e 74 0d 0a 20 20 61 | 74 20 74 68 65 20 63 6f |ont.. a|t the co|
|00000a10| 6f 72 64 69 6e 61 74 65 | 73 20 69 6e 20 74 68 65 |ordinate|s in the|
|00000a20| 20 63 75 72 72 65 6e 74 | 20 77 69 6e 64 6f 77 2e | current| window.|
|00000a30| 0d 0a 20 20 57 72 69 74 | 65 5f 77 69 6e 5f 6d 75 |.. Writ|e_win_mu|
|00000a40| 6c 74 69 5f 6c 61 72 67 | 65 28 29 20 69 73 20 74 |lti_larg|e() is t|
|00000a50| 68 65 20 6d 75 6c 74 69 | 20 76 65 72 73 69 6f 6e |he multi| version|
|00000a60| 20 6f 66 20 77 72 69 74 | 65 5f 77 69 6e 5f 6c 61 | of writ|e_win_la|
|00000a70| 72 67 65 20 61 6e 64 20 | 61 63 74 73 0d 0a 74 68 |rge and |acts..th|
|00000a80| 65 20 73 61 6d 65 20 61 | 73 20 77 72 69 74 65 5f |e same a|s write_|
|00000a90| 77 69 6e 5f 6d 75 6c 74 | 69 2e 20 41 67 61 69 6e |win_mult|i. Again|
|00000aa0| 20 63 68 61 72 61 63 74 | 65 72 73 20 61 72 65 20 | charact|ers are |
|00000ab0| 34 20 63 68 61 72 61 63 | 74 65 72 73 20 77 69 64 |4 charac|ters wid|
|00000ac0| 65 20 61 6e 64 0d 0a 38 | 20 63 68 61 72 61 63 74 |e and..8| charact|
|00000ad0| 65 72 73 20 74 61 6c 6c | 2e 20 43 6f 6f 72 64 69 |ers tall|. Coordi|
|00000ae0| 6e 61 74 65 73 20 61 72 | 65 20 75 70 70 65 72 20 |nates ar|e upper |
|00000af0| 6c 65 66 74 20 63 6f 72 | 6e 65 72 2e 0d 0a 20 20 |left cor|ner... |
|00000b00| 20 0d 0a 45 78 61 6d 70 | 6c 65 3a 0d 0a 20 20 0d | ..Examp|le:.. .|
|00000b10| 0a 20 20 6c 6f 61 64 5f | 66 6f 6e 74 28 22 66 64 |. load_|font("fd|
|00000b20| 65 6d 6f 32 2e 66 6e 74 | 22 2c 31 29 3b 0d 0a 20 |emo2.fnt|",1);.. |
|00000b30| 20 6c 6f 61 64 5f 65 6d | 75 6c 61 74 65 28 31 29 | load_em|ulate(1)|
|00000b40| 3b 0d 0a 20 20 77 72 69 | 74 65 5f 77 69 6e 5f 6d |;.. wri|te_win_m|
|00000b50| 75 6c 74 69 5f 6c 61 72 | 67 65 28 33 2c 33 2c 35 |ulti_lar|ge(3,3,5|
|00000b60| 2c 22 53 69 6d 70 6c 79 | 20 53 6f 66 74 22 29 3b |,"Simply| Soft");|
|00000b70| 0d 0a 20 20 20 0d 0a 20 | 20 54 68 69 73 20 6c 6f |.. .. | This lo|
|00000b80| 61 64 73 20 74 68 65 20 | 73 70 65 63 69 61 6c 20 |ads the |special |
|00000b90| 66 6f 6e 74 20 74 68 65 | 6e 20 74 68 65 20 67 72 |font the|n the gr|
|00000ba0| 61 70 68 69 63 20 65 6d | 75 6c 61 74 69 6f 6e 20 |aphic em|ulation |
|00000bb0| 63 68 61 72 61 63 74 65 | 72 73 20 28 4e 6f 74 65 |characte|rs (Note|
|00000bc0| 3a 0d 0a 20 20 65 6d 75 | 6c 61 74 69 6f 6e 20 63 |:.. emu|lation c|
|00000bd0| 68 61 72 61 63 74 65 72 | 73 20 6d 75 73 74 20 62 |haracter|s must b|
|00000be0| 65 20 6c 6f 61 64 20 61 | 66 74 65 72 20 74 68 65 |e load a|fter the|
|00000bf0| 20 66 6f 6e 74 2e 29 20 | 61 6e 64 20 66 69 6e 61 | font.) |and fina|
|00000c00| 6c 6c 79 20 64 69 73 70 | 6c 61 79 73 0d 0a 20 20 |lly disp|lays.. |
|00000c10| 74 68 65 20 73 74 72 69 | 6e 67 2e 0d 0a 20 20 53 |the stri|ng... S|
|00000c20| 65 74 5f 70 61 6c 65 74 | 74 65 28 29 20 69 73 20 |et_palet|te() is |
|00000c30| 74 6f 20 63 6f 6e 74 72 | 6f 6c 20 74 68 65 20 66 |to contr|ol the f|
|00000c40| 6f 72 65 20 61 6e 64 20 | 62 61 63 6b 67 72 6f 75 |ore and |backgrou|
|00000c50| 6e 64 20 63 6f 6c 6f 72 | 73 20 69 6e 20 64 75 61 |nd color|s in dua|
|00000c60| 6c 20 66 6f 6e 74 0d 0a | 6d 6f 64 65 2e 20 54 68 |l font..|mode. Th|
|00000c70| 65 72 65 20 61 72 65 20 | 31 36 20 70 61 6c 65 74 |ere are |16 palet|
|00000c80| 74 65 20 72 65 67 69 73 | 74 65 72 73 20 61 6e 64 |te regis|ters and|
|00000c90| 20 61 6e 79 20 6f 6e 65 | 20 6f 66 20 74 68 65 6d | any one| of them|
|00000ca0| 20 63 61 6e 20 62 65 20 | 73 65 74 20 74 6f 20 61 | can be |set to a|
|00000cb0| 6e 79 0d 0a 6f 6e 65 20 | 6f 66 20 36 34 20 63 6f |ny..one |of 64 co|
|00000cc0| 6c 6f 72 73 2e 0d 0a 20 | 20 20 0d 0a 45 78 61 6d |lors... | ..Exam|
|00000cd0| 70 6c 65 3a 0d 0a 20 20 | 20 0d 0a 20 20 73 65 74 |ple:.. | .. set|
|00000ce0| 5f 70 61 6c 65 74 74 65 | 28 32 2c 36 32 29 3b 0d |_palette|(2,62);.|
|00000cf0| 0a 20 20 0d 0a 20 20 54 | 68 69 73 20 73 65 74 73 |. .. T|his sets|
|00000d00| 20 74 68 65 20 6e 75 6d | 62 65 72 20 74 77 6f 20 | the num|ber two |
|00000d10| 70 61 6c 65 74 74 65 20 | 72 65 67 69 73 74 65 72 |palette |register|
|00000d20| 20 28 67 72 65 65 6e 29 | 20 74 6f 20 63 6f 6c 6f | (green)| to colo|
|00000d30| 72 20 36 32 20 28 79 65 | 6c 6c 6f 77 29 2e 0d 0a |r 62 (ye|llow)...|
|00000d40| 20 20 46 6f 6e 74 5f 67 | 65 74 5f 61 64 61 70 74 | Font_g|et_adapt|
|00000d50| 65 72 28 29 20 69 73 20 | 74 6f 20 63 68 65 63 6b |er() is |to check|
|00000d60| 20 66 6f 72 20 74 68 65 | 20 70 72 65 73 65 6e 74 | for the| present|
|00000d70| 73 20 6f 66 20 61 6e 20 | 45 47 41 2f 56 47 41 20 |s of an |EGA/VGA |
|00000d80| 61 64 61 70 74 65 72 2e | 0d 0a 49 74 20 77 69 6c |adapter.|..It wil|
|00000d90| 6c 20 72 65 74 75 72 6e | 20 33 20 66 6f 72 20 45 |l return| 3 for E|
|00000da0| 47 41 2c 20 39 20 66 6f | 72 20 56 47 41 2c 20 61 |GA, 9 fo|r VGA, a|
|00000db0| 6e 64 20 30 20 66 6f 72 | 20 61 6c 6c 20 65 6c 73 |nd 0 for| all els|
|00000dc0| 65 2e 20 44 75 61 6c 20 | 66 6f 6e 74 73 0d 0a 72 |e. Dual |fonts..r|
|00000dd0| 65 71 75 69 72 65 20 45 | 47 41 2f 56 47 41 20 61 |equire E|GA/VGA a|
|00000de0| 64 61 70 74 65 72 20 76 | 69 64 65 6f 2e 0d 0a 20 |dapter v|ideo... |
|00000df0| 20 20 0d 0a 45 78 61 6d | 70 6c 65 3a 0d 0a 20 20 | ..Exam|ple:.. |
|00000e00| 0d 0a 20 20 69 66 28 66 | 6f 6e 74 5f 67 65 74 5f |.. if(f|ont_get_|
|00000e10| 61 64 61 70 74 65 72 28 | 29 20 3d 3d 20 30 29 0d |adapter(|) == 0).|
|00000e20| 0a 20 20 7b 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |. {.. | |
|00000e30| 45 78 69 74 28 31 29 3b | 0d 0a 20 20 7d 0d 0a 20 |Exit(1);|.. }.. |
|00000e40| 20 20 0d 0a 20 20 54 68 | 69 73 20 63 6f 64 65 20 | .. Th|is code |
|00000e50| 77 69 6c 6c 20 63 68 65 | 63 6b 20 66 6f 72 20 61 |will che|ck for a|
|00000e60| 6e 20 45 47 41 2f 56 47 | 41 20 76 69 64 65 6f 20 |n EGA/VG|A video |
|00000e70| 61 64 61 70 74 65 72 20 | 61 6e 64 20 65 78 69 74 |adapter |and exit|
|00000e80| 20 69 66 20 6e 6f 74 0d | 0a 20 20 66 6f 75 6e 64 | if not.|. found|
|00000e90| 2e 0d 0a 20 20 54 6f 67 | 67 6c 65 5f 62 6c 69 6e |... Tog|gle_blin|
|00000ea0| 6b 28 29 20 74 75 72 6e | 73 20 74 68 65 20 62 6c |k() turn|s the bl|
|00000eb0| 69 6e 6b 20 62 69 74 20 | 6f 6e 20 61 6e 64 20 6f |ink bit |on and o|
|00000ec0| 66 66 20 66 6f 72 20 74 | 68 65 20 63 68 61 72 61 |ff for t|he chara|
|00000ed0| 63 74 65 72 20 61 74 20 | 74 68 65 0d 0a 63 75 72 |cter at |the..cur|
|00000ee0| 72 65 6e 74 20 63 75 72 | 73 6f 72 20 6c 6f 63 61 |rent cur|sor loca|
|00000ef0| 74 69 6f 6e 2e 20 31 20 | 66 6f 72 20 6f 6e 20 61 |tion. 1 |for on a|
|00000f00| 6e 64 20 30 20 66 6f 72 | 20 6f 66 66 2e 0d 0a 20 |nd 0 for| off... |
|00000f10| 20 20 20 0d 0a 45 78 61 | 6d 70 6c 65 3a 0d 0a 20 | ..Exa|mple:.. |
|00000f20| 20 20 0d 0a 20 20 20 74 | 6f 67 67 6c 65 5f 62 6c | .. t|oggle_bl|
|00000f30| 69 6e 6b 28 31 29 3b 0d | 0a 20 20 20 0d 0a 20 20 |ink(1);.|. .. |
|00000f40| 20 54 68 69 73 20 77 69 | 6c 6c 20 63 61 75 73 65 | This wi|ll cause|
|00000f50| 20 74 68 65 20 63 68 61 | 72 61 63 74 65 72 20 61 | the cha|racter a|
|00000f60| 74 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 63 75 |t the cu|rrent cu|
|00000f70| 72 73 6f 72 20 6c 6f 63 | 61 74 69 6f 6e 20 74 6f |rsor loc|ation to|
|00000f80| 20 62 6c 69 6e 6b 2e 0d | 0a 20 20 20 54 6f 67 67 | blink..|. Togg|
|00000f90| 6c 65 5f 69 6e 74 65 6e | 73 69 74 79 28 29 20 74 |le_inten|sity() t|
|00000fa0| 75 72 6e 73 20 74 68 65 | 20 69 6e 74 65 6e 73 69 |urns the| intensi|
|00000fb0| 74 79 20 62 69 74 20 28 | 62 69 74 20 33 20 6f 66 |ty bit (|bit 3 of|
|00000fc0| 20 74 68 65 20 61 74 74 | 72 69 62 75 74 65 29 20 | the att|ribute) |
|00000fd0| 6f 6e 0d 0a 61 6e 64 20 | 6f 66 66 2e 20 31 20 66 |on..and |off. 1 f|
|00000fe0| 6f 72 20 6f 6e 20 30 20 | 66 6f 72 20 6f 66 66 2e |or on 0 |for off.|
|00000ff0| 20 54 68 69 73 20 63 61 | 6e 20 62 65 20 75 73 65 | This ca|n be use|
|00001000| 64 20 74 6f 20 63 68 61 | 6e 67 65 20 74 68 65 20 |d to cha|nge the |
|00001010| 66 6f 6e 74 20 6f 6e 20 | 61 0d 0a 73 69 6e 67 6c |font on |a..singl|
|00001020| 65 20 63 68 61 72 61 63 | 74 65 72 2e 0d 0a 20 20 |e charac|ter... |
|00001030| 20 0d 0a 45 78 61 6d 70 | 6c 65 2e 0d 0a 20 20 20 | ..Examp|le... |
|00001040| 0d 0a 20 20 20 74 6f 67 | 67 6c 65 5f 69 6e 74 65 |.. tog|gle_inte|
|00001050| 6e 73 69 74 79 28 31 29 | 3b 0d 0a 20 20 20 0d 0a |nsity(1)|;.. ..|
|00001060| 20 20 20 54 68 69 73 20 | 77 69 6c 6c 20 74 75 72 | This |will tur|
|00001070| 6e 20 74 68 65 20 63 68 | 61 72 61 63 74 65 72 20 |n the ch|aracter |
|00001080| 61 74 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 63 |at the c|urrent c|
|00001090| 75 72 73 6f 72 20 6c 6f | 63 61 74 69 6f 6e 20 74 |ursor lo|cation t|
|000010a0| 6f 20 64 69 73 70 6c 61 | 79 0d 0a 20 20 20 74 68 |o displa|y.. th|
|000010b0| 65 20 68 69 67 68 20 62 | 61 6e 6b 20 66 6f 6e 74 |e high b|ank font|
|000010c0| 20 69 6e 20 64 75 61 6c | 20 6d 6f 64 65 2e 0d 0a | in dual| mode...|
|000010d0| 20 20 45 6e 61 62 6c 65 | 5f 72 65 73 65 74 28 29 | Enable|_reset()|
|000010e0| 20 77 69 6c 6c 20 65 6e | 61 62 6c 65 20 6f 72 20 | will en|able or |
|000010f0| 64 69 73 61 62 6c 65 20 | 74 68 65 20 70 61 6c 65 |disable |the pale|
|00001100| 74 74 65 20 72 65 73 65 | 74 20 77 69 74 68 20 61 |tte rese|t with a|
|00001110| 20 76 69 64 65 6f 20 6d | 6f 64 65 0d 0a 72 65 73 | video m|ode..res|
|00001120| 65 74 2e 20 31 20 64 69 | 73 61 62 6c 65 73 20 74 |et. 1 di|sables t|
|00001130| 68 65 20 72 65 73 65 74 | 20 61 6e 64 20 30 20 28 |he reset| and 0 (|
|00001140| 64 65 66 61 75 6c 74 29 | 20 65 6e 61 62 6c 65 73 |default)| enables|
|00001150| 20 69 74 2e 0d 0a 20 20 | 0d 0a 45 78 61 6d 70 6c | it... |..Exampl|
|00001160| 65 3a 0d 0a 20 20 0d 0a | 20 20 20 65 6e 61 62 6c |e:.. ..| enabl|
|00001170| 65 5f 72 65 73 65 74 28 | 31 29 3b 0d 0a 20 20 20 |e_reset(|1);.. |
|00001180| 0d 0a 20 20 20 54 68 69 | 73 20 77 69 6c 6c 20 64 |.. Thi|s will d|
|00001190| 69 73 61 62 6c 65 20 74 | 68 65 20 70 61 6c 65 74 |isable t|he palet|
|000011a0| 74 65 20 72 65 73 65 74 | 20 77 69 74 68 20 61 20 |te reset| with a |
|000011b0| 76 69 64 65 6f 20 6d 6f | 64 65 20 72 65 73 65 74 |video mo|de reset|
|000011c0| 20 73 6f 20 74 68 65 20 | 63 6f 6c 6f 72 73 0d 0a | so the |colors..|
|000011d0| 20 20 20 69 6e 20 74 68 | 65 20 70 61 6c 65 74 74 | in th|e palett|
|000011e0| 65 20 77 69 6c 6c 20 72 | 65 6d 61 69 6e 20 74 68 |e will r|emain th|
|000011f0| 65 20 73 61 6d 65 20 77 | 69 74 68 20 61 20 76 69 |e same w|ith a vi|
|00001200| 64 65 6f 20 63 68 61 6e | 67 65 2e 0d 0a 20 20 49 |deo chan|ge... I|
|00001210| 6e 69 74 5f 6d 75 6c 74 | 69 5f 66 6f 6e 74 28 29 |nit_mult|i_font()|
|00001220| 20 77 69 6c 6c 20 69 6e | 69 74 69 61 6c 69 7a 65 | will in|itialize|
|00001230| 20 74 68 65 20 66 6f 6e | 74 65 64 20 6c 69 62 73 | the fon|ted libs|
|00001240| 20 66 6f 72 20 64 75 61 | 6c 20 66 6f 6e 74 20 6d | for dua|l font m|
|00001250| 6f 64 65 2e 20 54 68 65 | 0d 0a 74 77 6f 20 62 61 |ode. The|..two ba|
|00001260| 6e 6b 73 20 61 72 65 20 | 6c 6f 61 64 65 64 20 77 |nks are |loaded w|
|00001270| 69 74 68 20 66 6f 6e 74 | 73 2c 20 74 68 65 20 70 |ith font|s, the p|
|00001280| 61 6c 65 74 74 65 20 69 | 73 20 73 65 74 20 61 6e |alette i|s set an|
|00001290| 64 20 74 68 65 20 70 61 | 6c 65 74 74 65 20 73 65 |d the pa|lette se|
|000012a0| 6c 65 63 74 0d 0a 69 73 | 20 73 65 74 2e 20 54 68 |lect..is| set. Th|
|000012b0| 65 20 70 61 6c 65 74 74 | 65 20 61 72 67 75 6d 65 |e palett|e argume|
|000012c0| 6e 74 20 74 61 6b 65 73 | 20 61 20 31 36 20 62 79 |nt takes| a 16 by|
|000012d0| 74 65 20 73 74 72 69 6e | 67 20 6f 66 20 75 6e 73 |te strin|g of uns|
|000012e0| 69 67 6e 65 64 20 63 68 | 61 72 61 63 74 65 72 73 |igned ch|aracters|
|000012f0| 0d 0a 61 6e 64 20 74 68 | 65 20 74 77 6f 20 66 6f |..and th|e two fo|
|00001300| 6e 74 73 20 61 72 65 20 | 74 68 65 20 70 61 74 68 |nts are |the path|
|00001310| 2f 66 69 6c 65 20 6e 61 | 6d 65 20 6f 66 20 74 68 |/file na|me of th|
|00001320| 65 20 66 6f 6e 74 73 20 | 74 6f 20 62 65 20 6c 6f |e fonts |to be lo|
|00001330| 61 64 65 64 2e 20 54 68 | 65 20 0d 0a 70 61 6c 65 |aded. Th|e ..pale|
|00001340| 74 74 65 20 73 65 6c 65 | 63 74 20 63 68 6f 6f 73 |tte sele|ct choos|
|00001350| 65 73 20 74 68 65 20 66 | 69 72 73 74 20 38 20 63 |es the f|irst 8 c|
|00001360| 68 61 72 61 63 74 65 72 | 73 20 28 30 29 20 6f 72 |haracter|s (0) or|
|00001370| 20 74 68 65 20 6c 61 73 | 74 20 38 20 63 68 61 72 | the las|t 8 char|
|00001380| 61 63 74 65 72 73 0d 0a | 28 31 29 20 6f 66 20 74 |acters..|(1) of t|
|00001390| 68 65 20 70 61 6c 65 74 | 74 65 20 61 72 67 75 6d |he palet|te argum|
|000013a0| 65 6e 74 20 66 6f 72 20 | 74 68 65 20 6d 61 6e 61 |ent for |the mana|
|000013b0| 67 65 64 20 70 61 6c 65 | 74 74 65 20 63 6f 6c 6f |ged pale|tte colo|
|000013c0| 72 73 2c 20 6c 6f 61 64 | 69 6e 67 20 62 6f 74 68 |rs, load|ing both|
|000013d0| 0d 0a 66 6f 72 65 67 72 | 6f 75 6e 64 20 61 6e 64 |..foregr|ound and|
|000013e0| 20 62 61 63 6b 67 72 6f | 75 6e 64 20 63 6f 6c 6f | backgro|und colo|
|000013f0| 72 73 20 74 68 65 20 73 | 61 6d 65 20 66 6f 72 20 |rs the s|ame for |
|00001400| 61 20 6d 61 6e 61 67 65 | 64 20 70 61 6c 65 74 74 |a manage|d palett|
|00001410| 65 2e 20 41 6c 73 6f 20 | 74 68 65 0d 0a 6c 61 72 |e. Also |the..lar|
|00001420| 67 65 20 66 6f 6e 74 20 | 65 6d 75 6c 61 74 65 20 |ge font |emulate |
|00001430| 69 73 20 6c 6f 61 64 65 | 64 20 69 6e 74 6f 20 74 |is loade|d into t|
|00001440| 68 65 20 68 69 67 68 20 | 62 61 6e 6b 2e 0d 0a 20 |he high |bank... |
|00001450| 20 0d 0a 45 78 61 6d 70 | 6c 65 3a 0d 0a 20 20 0d | ..Examp|le:.. .|
|00001460| 0a 20 20 20 75 6e 73 69 | 67 6e 65 64 20 63 68 61 |. unsi|gned cha|
|00001470| 72 20 70 61 6c 65 74 74 | 65 5b 31 36 5d 20 3d 20 |r palett|e[16] = |
|00001480| 7b 30 2c 31 2c 32 2c 33 | 2c 34 2c 35 2c 32 30 2c |{0,1,2,3|,4,5,20,|
|00001490| 37 2c 35 35 2c 35 36 2c | 35 37 2c 35 38 2c 35 39 |7,55,56,|57,58,59|
|000014a0| 2c 36 31 2c 36 32 2c 36 | 33 7d 3b 0d 0a 20 20 20 |,61,62,6|3};.. |
|000014b0| 20 20 20 20 0d 0a 20 20 | 20 69 6e 69 74 5f 6d 75 | .. | init_mu|
|000014c0| 6c 74 69 5f 66 6f 6e 74 | 28 22 66 6f 6e 74 31 2e |lti_font|("font1.|
|000014d0| 66 6e 74 22 2c 22 66 6f | 6e 74 32 2e 66 6e 74 22 |fnt","fo|nt2.fnt"|
|000014e0| 2c 70 61 6c 65 74 74 65 | 2c 31 29 3b 0d 0a 20 20 |,palette|,1);.. |
|000014f0| 20 20 20 0d 0a 20 20 20 | 54 68 69 73 20 77 69 6c | .. |This wil|
|00001500| 6c 20 73 65 74 20 75 70 | 20 74 68 65 20 64 75 61 |l set up| the dua|
|00001510| 6c 20 6d 6f 64 65 20 66 | 6f 6e 74 20 6d 61 6e 61 |l mode f|ont mana|
|00001520| 67 65 6d 65 6e 74 20 75 | 73 69 6e 67 20 66 6f 6e |gement u|sing fon|
|00001530| 74 31 20 61 6e 64 20 66 | 6f 6e 74 32 0d 0a 20 20 |t1 and f|ont2.. |
|00001540| 20 77 69 74 68 20 74 68 | 65 20 74 68 65 20 70 61 | with th|e the pa|
|00001550| 6c 65 74 74 65 20 73 65 | 74 20 66 6f 72 20 62 72 |lette se|t for br|
|00001560| 69 67 68 74 20 63 6f 6c | 6f 72 73 2e 0d 0a 20 20 |ight col|ors... |
|00001570| 20 55 6e 69 6e 69 74 5f | 6d 75 6c 74 69 5f 66 6f | Uninit_|multi_fo|
|00001580| 6e 74 28 29 20 77 69 6c | 6c 20 72 65 73 65 74 20 |nt() wil|l reset |
|00001590| 74 68 65 20 66 6f 6e 74 | 73 20 61 6e 64 20 70 61 |the font|s and pa|
|000015a0| 6c 65 74 74 65 20 66 6f | 72 20 73 74 61 6e 64 61 |lette fo|r standa|
|000015b0| 72 64 20 66 6f 6e 74 20 | 0d 0a 6d 6f 64 65 20 77 |rd font |..mode w|
|000015c0| 69 74 68 20 74 68 65 20 | 49 42 4d 20 73 74 61 6e |ith the |IBM stan|
|000015d0| 64 61 72 64 20 66 6f 6e | 74 2e 0d 0a 20 20 0d 0a |dard fon|t... ..|
|000015e0| 45 78 61 6d 70 6c 65 3a | 0d 0a 20 20 0d 0a 20 20 |Example:|.. .. |
|000015f0| 75 6e 69 6e 69 74 5f 6d | 75 6c 74 69 5f 66 6f 6e |uninit_m|ulti_fon|
|00001600| 74 28 29 3b 0d 0a 20 20 | 20 20 20 20 0d 0a 20 20 |t();.. | .. |
|00001610| 54 68 69 73 20 77 69 6c | 6c 20 72 65 73 65 74 20 |This wil|l reset |
|00001620| 74 68 65 20 70 61 6c 65 | 74 74 65 20 61 6e 64 20 |the pale|tte and |
|00001630| 66 6f 6e 74 20 61 6e 64 | 20 74 75 72 6e 20 6f 66 |font and| turn of|
|00001640| 66 20 74 68 65 20 64 75 | 61 6c 20 66 6f 6e 74 20 |f the du|al font |
|00001650| 6d 6f 64 65 2e 0d 0a 20 | 20 4c 6f 61 64 5f 6d 75 |mode... | Load_mu|
|00001660| 6c 74 69 5f 70 61 6c 28 | 29 20 73 65 74 73 20 74 |lti_pal(|) sets t|
|00001670| 68 65 20 70 61 6c 65 74 | 74 65 20 74 6f 20 75 73 |he palet|te to us|
|00001680| 65 20 65 74 68 65 72 20 | 74 68 65 20 62 61 63 6b |e ether |the back|
|00001690| 67 72 6f 75 6e 64 20 63 | 6f 6c 6f 72 73 20 28 30 |ground c|olors (0|
|000016a0| 29 0d 0a 6f 72 20 74 68 | 65 20 66 6f 72 65 67 72 |)..or th|e foregr|
|000016b0| 6f 75 6e 64 20 63 6f 6c | 6f 72 73 20 28 31 29 20 |ound col|ors (1) |
|000016c0| 66 6f 72 20 62 6f 74 68 | 20 62 61 63 6b 67 72 6f |for both| backgro|
|000016d0| 75 6e 64 20 61 6e 64 20 | 66 6f 72 65 67 72 6f 75 |und and |foregrou|
|000016e0| 6e 64 20 63 6f 6c 6f 72 | 2e 0d 0a 20 0d 0a 45 78 |nd color|... ..Ex|
|000016f0| 61 6d 70 6c 65 3a 0d 0a | 20 20 0d 0a 20 20 20 6c |ample:..| .. l|
|00001700| 6f 61 64 5f 6d 75 6c 74 | 69 5f 70 61 6c 28 31 29 |oad_mult|i_pal(1)|
|00001710| 3b 0d 0a 20 20 20 20 20 | 20 0d 0a 20 20 20 54 68 |;.. | .. Th|
|00001720| 69 73 20 77 69 6c 6c 20 | 6c 6f 61 64 20 74 68 65 |is will |load the|
|00001730| 20 66 6f 72 65 67 72 6f | 75 6e 64 20 63 6f 6c 6f | foregro|und colo|
|00001740| 72 73 20 69 6e 74 6f 20 | 74 68 65 20 62 61 63 6b |rs into |the back|
|00001750| 67 72 6f 75 6e 64 20 70 | 61 6c 65 74 74 65 20 63 |ground p|alette c|
|00001760| 6f 6c 6f 72 73 2e 0d 0a | 20 20 53 61 76 65 5f 63 |olors...| Save_c|
|00001770| 6f 6c 6f 72 5f 72 65 67 | 73 28 29 20 73 61 76 65 |olor_reg|s() save|
|00001780| 73 20 74 68 65 20 44 41 | 43 20 72 65 67 69 73 74 |s the DA|C regist|
|00001790| 65 72 73 20 74 6f 20 61 | 20 66 69 6c 65 2e 20 54 |ers to a| file. T|
|000017a0| 68 65 20 6f 6e 6c 79 20 | 70 61 72 61 6d 65 74 65 |he only |paramete|
|000017b0| 72 0d 0a 69 73 20 74 68 | 65 20 66 69 6c 65 20 6e |r..is th|e file n|
|000017c0| 61 6d 65 2e 20 49 66 20 | 74 68 65 20 66 69 6c 65 |ame. If |the file|
|000017d0| 20 64 6f 73 65 20 6e 6f | 74 20 65 78 69 73 74 20 | dose no|t exist |
|000017e0| 69 74 20 77 69 6c 6c 20 | 62 65 20 63 72 65 61 74 |it will |be creat|
|000017f0| 65 64 2e 0d 0a 20 20 0d | 0a 45 78 61 6d 70 6c 65 |ed... .|.Example|
|00001800| 3a 0d 0a 20 20 0d 0a 20 | 20 20 73 61 76 65 5f 63 |:.. .. | save_c|
|00001810| 6f 6c 6f 72 5f 72 65 67 | 73 28 22 54 45 53 54 2e |olor_reg|s("TEST.|
|00001820| 44 41 43 22 29 3b 0d 0a | 20 20 20 20 20 20 20 20 |DAC");..| |
|00001830| 20 20 20 20 0d 0a 20 20 | 20 54 68 69 73 20 77 69 | .. | This wi|
|00001840| 6c 6c 20 73 61 76 65 20 | 74 68 65 20 63 75 72 72 |ll save |the curr|
|00001850| 65 6e 74 20 44 41 43 20 | 72 65 67 69 73 74 65 72 |ent DAC |register|
|00001860| 20 73 65 74 20 74 6f 20 | 61 20 66 69 6c 65 20 63 | set to |a file c|
|00001870| 61 6c 6c 65 64 20 54 45 | 53 54 2e 44 41 43 2e 0d |alled TE|ST.DAC..|
|00001880| 0a 20 20 4c 6f 61 64 5f | 63 6f 6c 6f 72 5f 72 65 |. Load_|color_re|
|00001890| 67 73 28 29 20 77 69 6c | 6c 20 6c 6f 61 64 20 74 |gs() wil|l load t|
|000018a0| 68 65 20 44 41 43 20 72 | 65 67 69 73 74 65 72 73 |he DAC r|egisters|
|000018b0| 20 66 72 6f 6d 20 61 20 | 66 69 6c 65 2e 20 49 74 | from a |file. It|
|000018c0| 20 74 61 6b 65 73 20 6f | 6e 6c 79 0d 0a 6f 6e 65 | takes o|nly..one|
|000018d0| 20 70 61 72 61 6d 65 74 | 65 72 20 74 68 65 20 66 | paramet|er the f|
|000018e0| 69 6c 65 20 6e 61 6d 65 | 2e 0d 0a 20 20 0d 0a 45 |ile name|... ..E|
|000018f0| 78 61 6d 70 6c 65 3a 0d | 0a 20 20 20 0d 0a 20 20 |xample:.|. .. |
|00001900| 6c 6f 61 64 5f 63 6f 6c | 6f 72 5f 72 65 67 73 28 |load_col|or_regs(|
|00001910| 22 54 45 53 54 2e 44 41 | 43 22 29 3b 0d 0a 20 20 |"TEST.DA|C");.. |
|00001920| 20 0d 0a 20 20 54 68 69 | 73 20 77 69 6c 6c 20 6c | .. Thi|s will l|
|00001930| 6f 61 64 20 74 68 65 20 | 44 41 43 20 72 65 67 69 |oad the |DAC regi|
|00001940| 73 74 65 72 20 73 65 74 | 20 77 69 74 68 20 74 68 |ster set| with th|
|00001950| 65 20 64 61 74 61 20 69 | 6e 20 66 69 6c 65 20 54 |e data i|n file T|
|00001960| 45 53 54 2e 44 41 43 2e | 20 20 0d 0a 20 20 52 65 |EST.DAC.| .. Re|
|00001970| 61 64 5f 63 6f 6c 6f 72 | 5f 72 65 67 28 29 20 72 |ad_color|_reg() r|
|00001980| 65 61 64 73 20 61 20 73 | 69 6e 67 6c 65 20 44 41 |eads a s|ingle DA|
|00001990| 43 20 72 65 67 69 73 74 | 65 72 2e 20 54 68 65 20 |C regist|er. The |
|000019a0| 70 61 72 61 6d 65 74 65 | 72 73 20 61 72 65 20 61 |paramete|rs are a|
|000019b0| 20 74 68 72 65 65 0d 0a | 62 79 74 65 20 63 6f 6c | three..|byte col|
|000019c0| 6f 72 20 72 65 67 69 73 | 74 65 72 20 61 6e 64 20 |or regis|ter and |
|000019d0| 74 68 65 20 44 41 43 20 | 72 65 67 69 73 74 65 72 |the DAC |register|
|000019e0| 20 6e 75 6d 62 65 72 2e | 0d 0a 20 20 0d 0a 45 78 | number.|.. ..Ex|
|000019f0| 61 6d 70 6c 65 0d 0a 20 | 20 0d 0a 20 20 63 68 61 |ample.. | .. cha|
|00001a00| 72 20 63 6f 6c 6f 72 5b | 33 5d 3b 0d 0a 20 20 0d |r color[|3];.. .|
|00001a10| 0a 20 20 72 65 61 64 5f | 63 6f 6c 6f 72 5f 72 65 |. read_|color_re|
|00001a20| 67 28 63 6f 6c 6f 72 2c | 33 34 29 3b 0d 0a 20 20 |g(color,|34);.. |
|00001a30| 0d 0a 20 20 54 68 69 73 | 20 77 69 6c 6c 20 72 65 |.. This| will re|
|00001a40| 61 64 20 74 68 65 20 44 | 41 43 20 72 65 67 69 73 |ad the D|AC regis|
|00001a50| 74 65 72 20 6e 75 6d 62 | 65 72 20 33 34 27 73 20 |ter numb|er 34's |
|00001a60| 63 6f 6c 6f 72 20 73 65 | 74 74 69 6e 67 73 20 69 |color se|ttings i|
|00001a70| 6e 74 6f 20 74 68 65 0d | 0a 20 20 72 65 67 69 73 |nto the.|. regis|
|00001a80| 74 65 72 20 63 6f 6c 6f | 72 2e 20 43 6f 6c 6f 72 |ter colo|r. Color|
|00001a90| 5b 30 5d 20 69 73 2c 20 | 72 65 64 20 63 6f 6c 6f |[0] is, |red colo|
|00001aa0| 72 5b 31 5d 20 69 73 20 | 67 72 65 65 6e 2c 20 61 |r[1] is |green, a|
|00001ab0| 6e 64 20 63 6f 6c 6f 72 | 5b 32 5d 20 69 73 20 62 |nd color|[2] is b|
|00001ac0| 6c 75 65 2e 0d 0a 20 20 | 44 41 43 20 6e 75 6d 62 |lue... |DAC numb|
|00001ad0| 65 72 73 20 61 72 65 20 | 66 72 6f 6d 20 30 20 74 |ers are |from 0 t|
|00001ae0| 6f 20 32 35 35 2e 0d 0a | 20 20 57 72 69 74 65 5f |o 255...| Write_|
|00001af0| 63 6f 6c 6f 72 5f 72 65 | 67 28 29 20 77 69 6c 6c |color_re|g() will|
|00001b00| 20 6c 6f 61 64 20 61 20 | 73 69 6e 67 6c 65 20 44 | load a |single D|
|00001b10| 41 43 20 72 65 67 69 73 | 74 65 72 20 77 69 74 68 |AC regis|ter with|
|00001b20| 20 6e 65 77 20 63 6f 6c | 6f 72 20 73 65 74 74 69 | new col|or setti|
|00001b30| 6e 67 73 2e 0d 0a 54 68 | 65 20 70 61 72 61 6d 65 |ngs...Th|e parame|
|00001b40| 74 65 72 73 20 61 72 65 | 20 61 20 74 68 72 65 65 |ters are| a three|
|00001b50| 20 62 79 74 65 20 63 6f | 6c 6f 72 20 72 65 67 69 | byte co|lor regi|
|00001b60| 73 74 65 72 20 61 6e 64 | 20 74 68 65 20 44 41 43 |ster and| the DAC|
|00001b70| 20 72 65 67 69 73 74 65 | 72 20 6e 75 6d 62 65 72 | registe|r number|
|00001b80| 2e 0d 0a 20 20 20 0d 0a | 45 78 61 6d 70 6c 65 3a |... ..|Example:|
|00001b90| 0d 0a 20 20 0d 0a 20 20 | 20 63 68 61 72 20 63 6f |.. .. | char co|
|00001ba0| 6c 6f 72 5b 33 5d 3b 0d | 0a 20 20 20 0d 0a 20 20 |lor[3];.|. .. |
|00001bb0| 20 77 72 69 74 65 5f 63 | 6f 6c 6f 72 5f 72 65 67 | write_c|olor_reg|
|00001bc0| 28 63 6f 6c 6f 72 2c 33 | 34 29 3b 0d 0a 20 20 20 |(color,3|4);.. |
|00001bd0| 0d 0a 20 20 20 54 68 69 | 73 20 77 69 6c 6c 20 6c |.. Thi|s will l|
|00001be0| 6f 61 64 20 74 68 65 20 | 63 6f 6c 6f 72 20 73 65 |oad the |color se|
|00001bf0| 74 74 69 6e 67 73 20 69 | 6e 20 63 6f 6c 6f 72 20 |ttings i|n color |
|00001c00| 74 6f 20 44 41 43 20 72 | 65 67 69 73 74 65 72 20 |to DAC r|egister |
|00001c10| 33 34 2e 20 43 6f 6c 6f | 72 5b 30 5d 0d 0a 20 20 |34. Colo|r[0].. |
|00001c20| 20 69 73 20 72 65 64 2c | 20 63 6f 6c 6f 72 5b 31 | is red,| color[1|
|00001c30| 5d 20 69 73 20 67 72 65 | 65 6e 2c 20 61 6e 64 20 |] is gre|en, and |
|00001c40| 63 6f 6c 6f 72 5b 32 5d | 20 69 73 20 62 6c 75 65 |color[2]| is blue|
|00001c50| 2e 20 53 65 74 74 69 6e | 67 73 20 61 72 65 20 66 |. Settin|gs are f|
|00001c60| 72 6f 6d 20 30 20 74 6f | 0d 0a 20 20 20 36 33 2e |rom 0 to|.. 63.|
|00001c70| 20 44 41 43 20 72 65 67 | 69 73 74 65 72 20 6e 75 | DAC reg|ister nu|
|00001c80| 6d 62 65 72 73 20 61 72 | 65 20 66 72 6f 6d 20 30 |mbers ar|e from 0|
|00001c90| 20 74 6f 20 32 35 35 2e | 0d 0a 20 20 53 61 76 65 | to 255.|.. Save|
|00001ca0| 5f 70 61 6c 65 74 74 65 | 28 29 20 73 61 76 65 73 |_palette|() saves|
|00001cb0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 70 61 6c | the cur|rent pal|
|00001cc0| 65 74 74 65 20 73 65 74 | 74 69 6e 67 73 20 74 6f |ette set|tings to|
|00001cd0| 20 61 20 66 69 6c 65 2e | 20 54 68 65 20 0d 0a 70 | a file.| The ..p|
|00001ce0| 61 72 61 6d 65 74 65 72 | 20 69 73 20 74 68 65 20 |arameter| is the |
|00001cf0| 66 69 6c 65 20 70 61 74 | 68 20 61 6e 64 20 6e 61 |file pat|h and na|
|00001d00| 6d 65 2e 0d 0a 20 20 0d | 0a 45 78 61 6d 70 6c 65 |me... .|.Example|
|00001d10| 3a 0d 0a 20 20 0d 0a 20 | 20 73 61 76 65 5f 70 61 |:.. .. | save_pa|
|00001d20| 6c 65 74 74 65 28 22 54 | 45 53 54 2e 50 41 4c 22 |lette("T|EST.PAL"|
|00001d30| 29 3b 0d 0a 20 20 0d 0a | 20 20 54 68 69 73 20 77 |);.. ..| This w|
|00001d40| 69 6c 6c 20 73 61 76 65 | 20 74 68 65 20 63 75 72 |ill save| the cur|
|00001d50| 72 65 6e 74 20 70 61 6c | 65 74 74 65 20 74 6f 20 |rent pal|ette to |
|00001d60| 61 20 66 69 6c 65 20 63 | 61 6c 6c 65 64 20 54 45 |a file c|alled TE|
|00001d70| 53 54 2e 50 41 4c 2e 0d | 0a 20 20 4c 6f 61 64 5f |ST.PAL..|. Load_|
|00001d80| 70 61 6c 65 74 74 65 28 | 29 20 77 69 6c 6c 20 6c |palette(|) will l|
|00001d90| 6f 61 64 20 61 20 66 69 | 6c 65 20 77 69 74 68 20 |oad a fi|le with |
|00001da0| 70 61 6c 65 74 74 65 20 | 73 65 74 74 69 6e 67 73 |palette |settings|
|00001db0| 20 69 6e 20 74 6f 20 74 | 68 65 20 70 61 6c 65 74 | in to t|he palet|
|00001dc0| 74 65 2e 0d 0a 49 74 27 | 73 20 70 61 72 61 6d 65 |te...It'|s parame|
|00001dd0| 74 65 72 20 69 73 20 74 | 68 65 20 66 69 6c 65 20 |ter is t|he file |
|00001de0| 70 61 74 68 20 61 6e 64 | 20 6e 61 6d 65 2e 0d 0a |path and| name...|
|00001df0| 20 20 20 0d 0a 45 78 61 | 6d 70 6c 65 3a 0d 0a 20 | ..Exa|mple:.. |
|00001e00| 20 0d 0a 20 20 6c 6f 61 | 64 5f 70 61 6c 65 74 74 | .. loa|d_palett|
|00001e10| 65 28 22 54 45 53 54 2e | 50 41 4c 22 29 3b 0d 0a |e("TEST.|PAL");..|
|00001e20| 20 20 0d 0a 20 20 54 68 | 69 73 20 6c 6f 61 64 73 | .. Th|is loads|
|00001e30| 20 74 68 65 20 66 69 6c | 65 20 54 45 53 54 2e 50 | the fil|e TEST.P|
|00001e40| 41 4c 27 73 20 64 61 74 | 61 20 69 6e 74 6f 20 74 |AL's dat|a into t|
|00001e50| 68 65 20 70 61 6c 65 74 | 74 65 2e 0d 0a 20 20 57 |he palet|te... W|
|00001e60| 72 69 74 65 5f 70 61 6c | 65 74 74 65 28 29 20 6c |rite_pal|ette() l|
|00001e70| 6f 61 64 73 20 61 20 44 | 41 43 20 72 65 67 69 73 |oads a D|AC regis|
|00001e80| 74 65 72 20 69 6e 74 6f | 20 74 68 65 20 73 65 6c |ter into| the sel|
|00001e90| 65 63 74 65 64 20 70 61 | 6c 65 74 74 65 2e 20 54 |ected pa|lette. T|
|00001ea0| 68 65 0d 0a 70 61 72 61 | 6d 65 74 65 72 73 20 61 |he..para|meters a|
|00001eb0| 72 65 20 74 68 65 20 44 | 41 43 20 72 65 67 69 73 |re the D|AC regis|
|00001ec0| 74 65 72 20 6e 75 6d 62 | 65 72 20 28 30 20 74 6f |ter numb|er (0 to|
|00001ed0| 20 36 33 29 20 61 6e 64 | 20 70 61 6c 65 74 74 65 | 63) and| palette|
|00001ee0| 20 6e 75 6d 62 65 72 0d | 0a 28 30 20 74 6f 20 31 | number.|.(0 to 1|
|00001ef0| 35 29 2e 0d 0a 20 20 20 | 0d 0a 45 78 61 6d 70 6c |5)... |..Exampl|
|00001f00| 65 3a 0d 0a 20 20 0d 0a | 20 20 77 72 69 74 65 5f |e:.. ..| write_|
|00001f10| 70 61 6c 65 74 74 65 28 | 36 33 2c 31 35 29 3b 0d |palette(|63,15);.|
|00001f20| 0a 20 20 0d 0a 20 20 54 | 68 69 73 20 6c 6f 61 64 |. .. T|his load|
|00001f30| 73 20 44 41 43 20 6e 75 | 6d 62 65 72 20 36 33 20 |s DAC nu|mber 63 |
|00001f40| 28 43 5f 57 48 49 54 45 | 29 20 69 6e 74 6f 20 70 |(C_WHITE|) into p|
|00001f50| 61 6c 65 74 74 65 20 31 | 35 20 28 57 48 49 54 45 |alette 1|5 (WHITE|
|00001f60| 29 2e 0d 0a 20 20 52 65 | 61 64 5f 70 61 6c 65 74 |)... Re|ad_palet|
|00001f70| 74 65 28 29 20 77 69 6c | 6c 20 72 65 61 64 20 61 |te() wil|l read a|
|00001f80| 6e 64 20 72 65 74 75 72 | 6e 20 74 68 65 20 73 65 |nd retur|n the se|
|00001f90| 6c 65 63 74 65 64 20 70 | 61 6c 65 74 74 65 20 63 |lected p|alette c|
|00001fa0| 6f 6c 6f 72 20 6f 72 20 | 44 41 43 0d 0a 72 65 67 |olor or |DAC..reg|
|00001fb0| 69 73 74 65 72 20 6e 75 | 6d 62 65 72 2e 0d 0a 20 |ister nu|mber... |
|00001fc0| 20 0d 0a 45 78 61 6d 70 | 6c 65 3a 0d 0a 20 20 20 | ..Examp|le:.. |
|00001fd0| 0d 0a 20 20 69 6e 74 20 | 63 6f 6c 6f 72 3b 20 0d |.. int |color; .|
|00001fe0| 0a 20 20 20 0d 0a 20 20 | 63 6f 6c 6f 72 20 3d 20 |. .. |color = |
|00001ff0| 72 65 61 64 5f 70 61 6c | 65 74 74 65 28 35 29 3b |read_pal|ette(5);|
|00002000| 0d 0a 20 20 0d 0a 20 20 | 54 68 69 73 20 77 69 6c |.. .. |This wil|
|00002010| 6c 20 72 65 74 75 72 6e | 20 74 68 65 20 44 41 43 |l return| the DAC|
|00002020| 20 72 65 67 69 73 74 65 | 72 20 6e 75 6d 62 65 72 | registe|r number|
|00002030| 20 69 6e 20 70 61 6c 65 | 74 74 65 20 35 20 28 4d | in pale|tte 5 (M|
|00002040| 41 47 45 4e 54 41 29 20 | 74 6f 20 69 6e 74 0d 0a |AGENTA) |to int..|
|00002050| 20 20 63 6f 6c 6f 72 2e | 0d 0a 20 20 56 67 61 5f | color.|.. Vga_|
|00002060| 67 65 74 5f 61 64 61 70 | 74 65 72 28 29 20 77 69 |get_adap|ter() wi|
|00002070| 6c 6c 20 72 65 74 75 72 | 6e 20 74 68 65 20 76 69 |ll retur|n the vi|
|00002080| 64 65 6f 20 61 64 61 70 | 74 65 72 20 63 6f 64 65 |deo adap|ter code|
|00002090| 20 66 6f 72 20 45 47 41 | 20 28 33 29 2c 20 56 47 | for EGA| (3), VG|
|000020a0| 41 20 28 39 29 2c 0d 0a | 61 6e 64 20 61 6c 6c 20 |A (9),..|and all |
|000020b0| 6f 74 68 65 72 73 20 28 | 30 29 2e 0d 0a 20 20 0d |others (|0)... .|
|000020c0| 0a 45 78 61 6d 70 6c 65 | 3a 0d 0a 20 20 0d 0a 20 |.Example|:.. .. |
|000020d0| 20 69 6e 74 20 61 64 61 | 70 74 3b 0d 0a 20 20 0d | int ada|pt;.. .|
|000020e0| 0a 20 20 61 64 61 70 74 | 20 3d 20 76 67 61 5f 67 |. adapt| = vga_g|
|000020f0| 65 74 5f 61 64 61 70 74 | 65 72 28 29 3b 0d 0a 20 |et_adapt|er();.. |
|00002100| 20 0d 0a 20 20 54 68 69 | 73 20 77 69 6c 6c 20 72 | .. Thi|s will r|
|00002110| 65 74 75 72 6e 20 74 68 | 65 20 61 64 61 70 74 65 |eturn th|e adapte|
|00002120| 72 20 63 6f 64 65 20 69 | 6e 74 6f 20 61 64 61 70 |r code i|nto adap|
|00002130| 74 2e 0d 0a 20 20 47 72 | 61 79 5f 63 6f 6c 6f 72 |t... Gr|ay_color|
|00002140| 5f 72 65 67 28 29 20 77 | 69 6c 6c 20 67 72 61 79 |_reg() w|ill gray|
|00002150| 20 73 63 61 6c 65 20 61 | 20 73 65 6c 65 63 74 65 | scale a| selecte|
|00002160| 64 20 44 41 43 20 72 65 | 67 69 73 74 65 72 20 28 |d DAC re|gister (|
|00002170| 30 20 74 6f 20 32 35 35 | 29 2e 0d 0a 20 20 0d 0a |0 to 255|)... ..|
|00002180| 45 78 61 6d 70 6c 65 3a | 0d 0a 20 20 0d 0a 20 20 |Example:|.. .. |
|00002190| 67 72 61 79 5f 63 6f 6c | 6f 72 5f 72 65 67 28 35 |gray_col|or_reg(5|
|000021a0| 32 29 3b 0d 0a 20 20 0d | 0a 20 20 54 68 69 73 20 |2);.. .|. This |
|000021b0| 77 69 6c 6c 20 67 72 61 | 79 20 73 63 61 6c 65 20 |will gra|y scale |
|000021c0| 74 68 65 20 63 6f 6c 6f | 72 20 73 65 74 74 69 6e |the colo|r settin|
|000021d0| 67 73 20 69 6e 20 44 41 | 43 20 72 65 67 69 73 74 |gs in DA|C regist|
|000021e0| 65 72 20 35 32 2e 0d 0a | 20 20 47 72 61 79 5f 63 |er 52...| Gray_c|
|000021f0| 6f 6c 6f 72 5f 72 65 67 | 73 28 29 20 77 69 6c 6c |olor_reg|s() will|
|00002200| 20 67 72 61 79 20 73 63 | 61 6c 65 20 61 6c 6c 20 | gray sc|ale all |
|00002210| 74 68 65 20 44 41 43 20 | 72 65 67 69 73 74 65 72 |the DAC |register|
|00002220| 73 2e 0d 0a 20 20 0d 0a | 45 78 61 6d 70 6c 65 3a |s... ..|Example:|
|00002230| 0d 0a 20 20 0d 0a 20 20 | 67 72 61 79 5f 63 6f 6c |.. .. |gray_col|
|00002240| 6f 72 5f 72 65 67 73 28 | 29 3b 0d 0a 20 20 0d 0a |or_regs(|);.. ..|
|00002250| 20 20 54 68 69 73 20 77 | 69 6c 6c 20 67 72 61 79 | This w|ill gray|
|00002260| 20 73 63 61 6c 65 20 74 | 68 65 20 63 6f 6c 6f 72 | scale t|he color|
|00002270| 20 73 65 74 74 69 6e 67 | 73 20 69 6e 20 61 6c 6c | setting|s in all|
|00002280| 20 6f 66 20 74 68 65 20 | 44 41 43 20 72 65 67 69 | of the |DAC regi|
|00002290| 73 74 65 72 73 2e 20 59 | 6f 75 20 0d 0a 20 20 73 |sters. Y|ou .. s|
|000022a0| 68 6f 75 6c 64 20 75 73 | 65 20 73 61 76 65 5f 63 |hould us|e save_c|
|000022b0| 6f 6c 6f 72 5f 72 65 67 | 73 28 29 20 62 65 66 6f |olor_reg|s() befo|
|000022c0| 72 65 20 74 68 69 73 20 | 63 61 6c 6c 20 66 6f 72 |re this |call for|
|000022d0| 20 72 65 73 65 74 74 69 | 6e 67 20 74 68 65 20 44 | resetti|ng the D|
|000022e0| 41 43 20 0d 0a 20 20 72 | 65 67 69 73 74 65 72 73 |AC .. r|egisters|
|000022f0| 2e 0d 0a 20 20 20 45 6e | 61 62 6c 65 5f 72 65 73 |... En|able_res|
|00002300| 65 74 28 29 20 77 69 6c | 6c 20 65 6e 61 62 6c 65 |et() wil|l enable|
|00002310| 20 28 74 75 72 6e 20 6f | 6e 20 61 6e 64 20 6f 66 | (turn o|n and of|
|00002320| 66 29 20 74 68 65 20 64 | 65 66 61 75 6c 74 20 70 |f) the d|efault p|
|00002330| 61 6c 65 74 74 65 20 72 | 65 73 65 74 0d 0a 77 69 |alette r|eset..wi|
|00002340| 74 68 20 61 20 76 69 64 | 65 6f 20 6d 6f 64 65 20 |th a vid|eo mode |
|00002350| 63 68 61 6e 67 65 2e 20 | 31 20 69 73 20 64 69 73 |change. |1 is dis|
|00002360| 61 62 6c 65 64 20 30 20 | 28 64 65 66 61 75 6c 74 |abled 0 |(default|
|00002370| 29 20 69 73 20 65 6e 61 | 62 6c 65 2e 0d 0a 20 20 |) is ena|ble... |
|00002380| 0d 0a 45 78 61 6d 70 6c | 65 3a 0d 0a 20 20 0d 0a |..Exampl|e:.. ..|
|00002390| 20 20 20 65 6e 61 62 6c | 65 5f 72 65 73 65 74 28 | enabl|e_reset(|
|000023a0| 31 29 3b 0d 0a 20 20 0d | 0a 20 20 20 54 68 69 73 |1);.. .|. This|
|000023b0| 20 77 69 6c 6c 20 64 69 | 73 61 62 6c 65 20 6f 72 | will di|sable or|
|000023c0| 20 74 75 72 6e 20 6f 66 | 20 74 68 65 20 70 61 6c | turn of| the pal|
|000023d0| 65 74 74 65 20 72 65 73 | 65 74 20 77 69 74 68 20 |ette res|et with |
|000023e0| 61 20 76 69 64 65 6f 20 | 63 68 61 6e 67 65 2e 20 |a video |change. |
|000023f0| 54 68 69 73 0d 0a 20 20 | 20 61 6c 6c 6f 77 73 20 |This.. | allows |
|00002400| 73 70 65 63 69 61 6c 20 | 70 61 6c 65 74 74 65 20 |special |palette |
|00002410| 73 65 74 74 69 6e 67 73 | 20 74 6f 20 72 65 6d 61 |settings| to rema|
|00002420| 69 6e 20 77 69 74 68 20 | 61 20 76 69 64 65 6f 20 |in with |a video |
|00002430| 6d 6f 64 65 20 63 68 61 | 6e 67 65 20 6f 72 20 0d |mode cha|nge or .|
|00002440| 0a 20 20 20 72 65 73 65 | 74 2e 0d 0a 20 20 20 49 |. rese|t... I|
|00002450| 6e 69 74 5f 76 67 61 65 | 64 69 74 28 29 20 74 68 |nit_vgae|dit() th|
|00002460| 69 73 20 77 69 6c 6c 20 | 77 69 6c 6c 20 73 61 76 |is will |will sav|
|00002470| 65 20 62 6f 74 68 20 74 | 68 65 20 63 75 72 72 65 |e both t|he curre|
|00002480| 6e 74 20 70 61 6c 65 74 | 74 65 20 61 6e 64 20 44 |nt palet|te and D|
|00002490| 41 43 0d 0a 72 65 67 69 | 73 74 65 72 73 20 74 6f |AC..regi|sters to|
|000024a0| 20 74 65 6d 70 20 66 69 | 6c 65 73 20 66 6f 72 20 | temp fi|les for |
|000024b0| 72 65 73 65 74 74 69 6e | 67 20 61 74 20 74 68 65 |resettin|g at the|
|000024c0| 20 65 6e 64 20 6f 66 20 | 74 68 65 20 70 72 6f 67 | end of |the prog|
|000024d0| 72 61 6d 2e 0d 0a 20 20 | 0d 0a 45 78 61 6d 70 6c |ram... |..Exampl|
|000024e0| 65 3a 0d 0a 20 20 0d 0a | 20 20 20 69 6e 69 74 5f |e:.. ..| init_|
|000024f0| 76 67 61 65 64 69 74 28 | 29 3b 0d 0a 20 20 20 20 |vgaedit(|);.. |
|00002500| 20 20 0d 0a 20 20 20 54 | 68 69 73 20 73 61 76 65 | .. T|his save|
|00002510| 73 20 74 68 65 20 70 61 | 6c 65 74 74 65 20 61 6e |s the pa|lette an|
|00002520| 64 20 44 41 43 2e 0d 0a | 20 20 20 55 6e 69 6e 69 |d DAC...| Unini|
|00002530| 74 5f 76 67 61 65 64 69 | 74 28 29 20 72 65 73 74 |t_vgaedi|t() rest|
|00002540| 6f 72 65 73 20 74 68 65 | 20 70 61 6c 65 74 74 65 |ores the| palette|
|00002550| 20 61 6e 64 20 44 41 43 | 20 72 65 67 69 73 74 65 | and DAC| registe|
|00002560| 72 73 20 73 61 76 65 64 | 20 62 79 20 0d 0a 69 6e |rs saved| by ..in|
|00002570| 69 74 5f 76 67 61 65 64 | 69 74 28 29 20 61 6e 64 |it_vgaed|it() and|
|00002580| 20 72 65 6d 6f 76 65 73 | 20 74 68 65 20 74 65 6d | removes| the tem|
|00002590| 70 20 66 69 6c 65 73 2e | 0d 0a 20 20 20 0d 0a 45 |p files.|.. ..E|
|000025a0| 78 61 6d 70 6c 65 3a 0d | 0a 20 20 20 0d 0a 20 20 |xample:.|. .. |
|000025b0| 20 75 6e 69 6e 69 74 5f | 76 67 61 65 64 69 74 28 | uninit_|vgaedit(|
|000025c0| 29 3b 0d 0a 20 20 20 20 | 20 20 20 20 20 20 0d 0a |);.. | ..|
|000025d0| 20 20 20 54 68 69 73 20 | 72 65 73 74 6f 72 65 73 | This |restores|
|000025e0| 20 74 68 65 20 70 61 6c | 65 74 74 65 20 61 6e 64 | the pal|ette and|
|000025f0| 20 44 41 43 2e 0d 0a 20 | 20 4d 6f 75 69 6e 73 74 | DAC... | Mouinst|
|00002600| 61 6c 6c 28 29 20 69 73 | 20 75 73 65 64 20 74 6f |all() is| used to|
|00002610| 20 63 68 65 63 6b 20 66 | 6f 72 20 61 20 6d 6f 75 | check f|or a mou|
|00002620| 73 65 20 64 72 69 76 65 | 72 20 61 6e 64 20 72 65 |se drive|r and re|
|00002630| 74 75 72 6e 73 20 74 68 | 65 20 6e 75 6d 62 65 72 |turns th|e number|
|00002640| 0d 0a 6f 66 20 62 75 74 | 74 6f 6e 73 20 69 6e 73 |..of but|tons ins|
|00002650| 74 61 6c 6c 65 64 20 62 | 79 20 74 68 65 20 64 72 |talled b|y the dr|
|00002660| 69 76 65 72 2e 0d 0a 20 | 20 0d 0a 45 78 61 6d 70 |iver... | ..Examp|
|00002670| 6c 65 3a 0d 0a 20 20 20 | 0d 0a 20 20 69 6e 74 20 |le:.. |.. int |
|00002680| 62 75 74 74 6f 6e 73 3b | 0d 0a 20 20 20 0d 0a 20 |buttons;|.. .. |
|00002690| 20 62 75 74 74 6f 6e 73 | 20 3d 20 6d 6f 75 69 6e | buttons| = mouin|
|000026a0| 73 74 61 6c 6c 28 29 3b | 0d 0a 20 20 0d 0a 20 20 |stall();|.. .. |
|000026b0| 54 68 69 73 20 77 69 6c | 6c 20 63 68 65 63 6b 20 |This wil|l check |
|000026c0| 66 6f 72 20 74 68 65 20 | 70 72 65 73 65 6e 74 73 |for the |presents|
|000026d0| 20 6f 66 20 61 20 6d 6f | 75 73 65 20 64 72 69 76 | of a mo|use driv|
|000026e0| 65 72 20 61 6e 64 20 70 | 6c 61 63 65 20 74 68 65 |er and p|lace the|
|000026f0| 20 6e 75 6d 62 65 72 0d | 0a 20 20 6f 66 20 62 75 | number.|. of bu|
|00002700| 74 74 6f 6e 73 20 69 6e | 73 74 61 6c 6c 65 64 20 |ttons in|stalled |
|00002710| 69 6e 74 6f 20 62 75 74 | 74 6f 6e 73 2e 20 49 74 |into but|tons. It|
|00002720| 20 72 65 74 75 72 6e 73 | 20 30 20 69 66 20 6f 6e | returns| 0 if on|
|00002730| 20 64 72 69 76 65 72 20 | 64 65 74 65 63 74 65 64 | driver |detected|
|00002740| 2e 0d 0a 20 20 4d 6f 75 | 72 65 73 65 74 28 29 20 |... Mou|reset() |
|00002750| 72 65 73 65 74 73 20 74 | 68 65 20 6d 6f 75 73 65 |resets t|he mouse|
|00002760| 20 64 72 69 76 65 72 20 | 69 66 20 69 6e 73 74 61 | driver |if insta|
|00002770| 6c 6c 65 64 2e 0d 0a 20 | 20 0d 0a 45 78 61 6d 70 |lled... | ..Examp|
|00002780| 6c 65 3a 0d 0a 20 20 0d | 0a 20 20 6d 6f 75 72 65 |le:.. .|. moure|
|00002790| 73 65 74 28 29 3b 0d 0a | 20 20 0d 0a 20 20 54 68 |set();..| .. Th|
|000027a0| 69 73 20 72 65 73 65 74 | 73 20 74 68 65 20 6d 6f |is reset|s the mo|
|000027b0| 75 73 65 20 64 72 69 76 | 65 72 2e 0d 0a 20 20 4d |use driv|er... M|
|000027c0| 6f 75 62 75 74 74 6f 6e | 70 72 65 73 73 65 64 28 |oubutton|pressed(|
|000027d0| 29 20 43 68 65 63 6b 73 | 20 74 6f 20 73 65 65 20 |) Checks| to see |
|000027e0| 69 66 20 61 20 6d 6f 75 | 73 65 20 62 75 74 74 6f |if a mou|se butto|
|000027f0| 6e 20 68 61 73 20 62 65 | 65 6e 20 70 72 65 73 73 |n has be|en press|
|00002800| 65 64 20 61 6e 64 0d 0a | 72 65 74 75 72 6e 73 20 |ed and..|returns |
|00002810| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 6f 63 |the numb|er of oc|
|00002820| 63 75 72 72 65 6e 63 65 | 73 20 73 69 6e 63 65 20 |currence|s since |
|00002830| 6c 61 73 74 20 63 68 65 | 63 6b 65 64 2e 0d 0a 44 |last che|cked...D|
|00002840| 45 46 49 4e 45 53 3a 20 | 4c 45 46 54 42 55 54 54 |EFINES: |LEFTBUTT|
|00002850| 4f 4e 20 20 3d 20 30 0d | 0a 20 20 20 20 20 20 20 |ON = 0.|. |
|00002860| 20 20 52 49 47 48 54 42 | 55 54 54 4f 4e 20 3d 20 | RIGHTB|UTTON = |
|00002870| 31 0d 0a 20 20 20 20 20 | 20 20 20 20 4d 49 44 42 |1.. | MIDB|
|00002880| 55 54 54 4f 4e 20 20 20 | 3d 20 32 0d 0a 20 20 20 |UTTON |= 2.. |
|00002890| 0d 0a 45 78 61 6d 70 6c | 65 3a 0d 0a 20 0d 0a 20 |..Exampl|e:.. .. |
|000028a0| 20 6d 6f 75 62 75 74 74 | 6f 6e 70 72 65 73 73 65 | moubutt|onpresse|
|000028b0| 64 28 4c 45 46 54 42 55 | 54 54 4f 4e 29 3b 0d 0a |d(LEFTBU|TTON);..|
|000028c0| 20 20 0d 0a 20 20 54 68 | 69 73 20 77 69 6c 6c 20 | .. Th|is will |
|000028d0| 63 68 65 63 6b 20 66 6f | 72 20 4c 65 66 74 20 62 |check fo|r Left b|
|000028e0| 75 74 74 6f 6e 20 70 72 | 65 73 73 65 64 20 61 6e |utton pr|essed an|
|000028f0| 64 20 72 65 74 75 72 6e | 73 20 74 68 65 20 6e 75 |d return|s the nu|
|00002900| 6d 62 65 72 20 6f 66 20 | 74 69 6d 65 73 20 0d 0a |mber of |times ..|
|00002910| 20 20 73 69 6e 63 65 20 | 6c 61 73 74 65 64 20 63 | since |lasted c|
|00002920| 68 65 63 6b 65 64 2e 0d | 0a 20 20 4d 6f 75 68 69 |hecked..|. Mouhi|
|00002930| 64 65 20 74 75 72 6e 73 | 20 74 68 65 20 6d 6f 75 |de turns| the mou|
|00002940| 73 65 20 63 75 72 73 6f | 72 20 6f 66 66 2e 0d 0a |se curso|r off...|
|00002950| 20 20 0d 0a 45 78 61 6d | 70 6c 65 3a 0d 0a 20 20 | ..Exam|ple:.. |
|00002960| 0d 0a 20 20 6d 6f 75 68 | 69 64 65 28 29 3b 0d 0a |.. mouh|ide();..|
|00002970| 20 20 20 0d 0a 20 20 54 | 68 69 73 20 77 69 6c 6c | .. T|his will|
|00002980| 20 68 69 64 65 20 74 68 | 65 20 6d 6f 75 73 65 20 | hide th|e mouse |
|00002990| 63 75 72 73 6f 72 20 66 | 72 6f 6d 20 64 69 73 70 |cursor f|rom disp|
|000029a0| 6c 61 79 2e 0d 0a 20 20 | 4d 6f 75 73 68 6f 77 28 |lay... |Moushow(|
|000029b0| 29 20 74 75 72 6e 73 20 | 74 68 65 20 6d 6f 75 73 |) turns |the mous|
|000029c0| 65 20 63 75 72 73 6f 72 | 20 6f 6e 2e 0d 0a 20 20 |e cursor| on... |
|000029d0| 0d 0a 45 78 61 6d 70 6c | 65 3a 0d 0a 20 20 0d 0a |..Exampl|e:.. ..|
|000029e0| 20 20 6d 6f 75 73 68 6f | 77 28 29 3b 0d 0a 20 20 | mousho|w();.. |
|000029f0| 0d 0a 20 20 54 68 69 73 | 20 77 69 6c 6c 20 64 69 |.. This| will di|
|00002a00| 73 70 6c 61 79 20 74 68 | 65 20 6d 6f 75 73 65 20 |splay th|e mouse |
|00002a10| 63 75 72 73 6f 72 2e 20 | 53 68 6f 75 6c 64 20 62 |cursor. |Should b|
|00002a20| 65 20 63 61 6c 6c 20 6f | 6e 63 65 20 66 6f 72 20 |e call o|nce for |
|00002a30| 65 76 65 72 79 20 63 61 | 6c 6c 0d 0a 20 20 74 6f |every ca|ll.. to|
|00002a40| 20 6d 6f 75 68 69 64 65 | 28 29 2e 0d 0a 20 20 4d | mouhide|()... M|
|00002a50| 6f 75 63 75 72 73 6f 72 | 74 79 70 65 28 29 20 73 |oucursor|type() s|
|00002a60| 65 6c 65 63 74 73 20 74 | 68 65 20 63 75 72 73 6f |elects t|he curso|
|00002a70| 72 20 63 68 61 72 61 63 | 74 65 72 20 66 72 6f 6d |r charac|ter from|
|00002a80| 20 74 68 65 20 63 75 72 | 73 6f 72 20 66 6f 6e 74 | the cur|sor font|
|00002a90| 20 62 75 66 66 65 72 2e | 0d 0a 33 32 20 63 68 61 | buffer.|..32 cha|
|00002aa0| 72 61 63 74 65 72 73 20 | 63 61 6e 20 62 65 20 6c |racters |can be l|
|00002ab0| 6f 61 64 65 64 20 69 6e | 74 6f 20 74 68 65 20 62 |oaded in|to the b|
|00002ac0| 75 66 66 65 72 20 77 69 | 74 68 20 6c 6f 61 64 63 |uffer wi|th loadc|
|00002ad0| 75 72 73 28 29 2e 0d 0a | 20 20 20 0d 0a 45 78 61 |urs()...| ..Exa|
|00002ae0| 6d 70 6c 65 3a 0d 0a 20 | 20 0d 0a 20 20 6d 6f 75 |mple:.. | .. mou|
|00002af0| 63 75 72 73 6f 72 74 79 | 70 65 28 33 29 3b 0d 0a |cursorty|pe(3);..|
|00002b00| 20 20 0d 0a 20 20 54 68 | 69 73 20 77 69 6c 6c 20 | .. Th|is will |
|00002b10| 75 73 65 20 74 68 65 20 | 6e 75 6d 62 65 72 20 33 |use the |number 3|
|00002b20| 20 63 75 72 73 6f 72 20 | 63 68 61 72 61 63 74 65 | cursor |characte|
|00002b30| 72 20 69 6e 20 74 68 65 | 20 63 75 72 73 6f 72 20 |r in the| cursor |
|00002b40| 66 6f 6e 74 20 62 75 66 | 66 65 72 2e 0d 0a 20 20 |font buf|fer... |
|00002b50| 4d 6f 75 73 65 74 70 6f | 73 69 74 69 6f 6e 28 29 |Mousetpo|sition()|
|00002b60| 20 77 69 6c 6c 20 70 6c | 61 63 65 20 74 68 65 20 | will pl|ace the |
|00002b70| 6d 6f 75 73 65 20 63 75 | 72 73 6f 72 20 74 6f 20 |mouse cu|rsor to |
|00002b80| 74 68 65 20 73 65 6c 65 | 63 74 65 64 20 63 6f 6f |the sele|cted coo|
|00002b90| 72 64 69 6e 61 74 65 73 | 2e 0d 0a 20 20 0d 0a 45 |rdinates|... ..E|
|00002ba0| 78 61 6d 70 6c 65 0d 0a | 20 20 0d 0a 20 20 6d 6f |xample..| .. mo|
|00002bb0| 75 73 65 74 70 6f 73 69 | 74 69 6f 6e 28 32 30 2c |usetposi|tion(20,|
|00002bc0| 31 30 29 3b 0d 0a 20 20 | 0d 0a 20 20 54 68 69 73 |10);.. |.. This|
|00002bd0| 20 73 65 74 20 74 68 65 | 20 6d 6f 75 73 65 20 63 | set the| mouse c|
|00002be0| 75 72 73 6f 72 20 74 6f | 20 58 2c 59 20 63 6f 6f |ursor to| X,Y coo|
|00002bf0| 72 64 69 6e 61 74 65 73 | 20 32 30 2c 31 30 2e 0d |rdinates| 20,10..|
|00002c00| 0a 20 20 4d 6f 75 73 65 | 74 6d 61 78 70 6f 73 69 |. Mouse|tmaxposi|
|00002c10| 74 69 6f 6e 28 29 20 64 | 65 66 69 6e 65 73 20 61 |tion() d|efines a|
|00002c20| 20 77 69 6e 64 6f 77 20 | 66 6f 72 20 6d 6f 75 73 | window |for mous|
|00002c30| 65 20 6c 69 6d 69 74 73 | 2e 0d 0a 20 20 0d 0a 45 |e limits|... ..E|
|00002c40| 78 61 6d 70 6c 65 3a 0d | 0a 20 20 0d 0a 20 20 69 |xample:.|. .. i|
|00002c50| 6e 74 20 6c 65 66 74 20 | 3d 20 32 30 2c 72 69 67 |nt left |= 20,rig|
|00002c60| 68 74 20 3d 20 34 30 2c | 74 6f 70 20 3d 20 38 2c |ht = 40,|top = 8,|
|00002c70| 62 6f 74 74 6f 6d 20 3d | 20 31 35 3b 0d 0a 20 20 |bottom =| 15;.. |
|00002c80| 0d 0a 20 20 6d 6f 75 73 | 65 74 6d 61 78 70 6f 73 |.. mous|etmaxpos|
|00002c90| 69 74 69 6f 6e 28 6c 65 | 66 74 2c 72 69 67 68 74 |ition(le|ft,right|
|00002ca0| 2c 74 6f 70 2c 62 6f 74 | 74 6f 6d 29 3b 0d 0a 20 |,top,bot|tom);.. |
|00002cb0| 20 0d 0a 20 20 54 68 69 | 73 20 6c 69 6d 69 74 73 | .. Thi|s limits|
|00002cc0| 20 74 68 65 20 6d 6f 75 | 73 65 20 77 69 6e 64 6f | the mou|se windo|
|00002cd0| 77 20 74 6f 20 77 69 6e | 64 6f 77 28 32 30 2c 38 |w to win|dow(20,8|
|00002ce0| 2c 34 30 2c 31 35 29 2e | 0d 0a 20 20 4d 6f 75 62 |,40,15).|.. Moub|
|00002cf0| 75 74 74 6f 6e 72 65 6c | 65 61 73 65 28 29 20 69 |uttonrel|ease() i|
|00002d00| 73 20 74 68 65 20 73 61 | 6d 65 20 61 73 20 6d 6f |s the sa|me as mo|
|00002d10| 75 62 75 74 74 6f 6e 70 | 72 65 73 73 65 64 28 29 |ubuttonp|ressed()|
|00002d20| 20 62 75 74 20 63 68 65 | 63 6b 20 66 6f 72 20 61 | but che|ck for a|
|00002d30| 0d 0a 62 75 74 74 6f 6e | 20 72 65 6c 65 61 73 65 |..button| release|
|00002d40| 20 61 6e 64 20 72 65 74 | 75 72 6e 73 20 74 68 65 | and ret|urns the|
|00002d50| 20 6e 75 6d 62 65 72 20 | 6f 66 20 74 69 6d 65 73 | number |of times|
|00002d60| 20 73 69 6e 63 65 20 6c | 61 73 74 20 63 68 65 63 | since l|ast chec|
|00002d70| 6b 65 64 2e 0d 0a 20 20 | 20 0d 0a 45 78 61 6d 70 |ked... | ..Examp|
|00002d80| 6c 65 3a 0d 0a 20 20 0d | 0a 20 20 6d 6f 75 62 75 |le:.. .|. moubu|
|00002d90| 74 74 6f 6e 72 65 6c 65 | 61 73 65 28 52 49 47 48 |ttonrele|ase(RIGH|
|00002da0| 54 42 55 54 54 4f 4e 29 | 3b 0d 0a 20 20 0d 0a 20 |TBUTTON)|;.. .. |
|00002db0| 20 54 68 69 73 20 63 68 | 65 63 6b 73 20 66 6f 72 | This ch|ecks for|
|00002dc0| 20 61 20 62 75 74 74 6f | 6e 20 72 65 6c 65 61 73 | a butto|n releas|
|00002dd0| 65 20 61 6e 64 20 72 65 | 74 75 72 6e 73 20 74 68 |e and re|turns th|
|00002de0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 74 69 6d 65 |e number| of time|
|00002df0| 73 20 73 69 6e 63 65 0d | 0a 20 20 6c 61 73 74 65 |s since.|. laste|
|00002e00| 64 20 63 68 65 63 6b 65 | 64 2e 0d 0a 20 20 4c 6f |d checke|d... Lo|
|00002e10| 61 64 63 75 72 73 28 29 | 20 6c 6f 61 64 73 20 74 |adcurs()| loads t|
|00002e20| 68 65 20 6d 6f 75 73 65 | 20 63 75 72 73 6f 72 20 |he mouse| cursor |
|00002e30| 66 6f 6e 74 73 2e 20 49 | 74 20 77 69 6c 6c 20 6c |fonts. I|t will l|
|00002e40| 6f 61 64 20 74 68 65 20 | 66 69 72 73 74 20 33 32 |oad the |first 32|
|00002e50| 20 0d 0a 63 68 61 72 61 | 63 74 65 72 73 20 6f 66 | ..chara|cters of|
|00002e60| 20 61 20 66 6f 6e 74 2e | 20 49 74 20 74 61 6b 65 | a font.| It take|
|00002e70| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 74 68 65 20 | pointer| to the |
|00002e80| 70 61 74 68 2f 66 69 6c | 65 6e 61 6d 65 20 6f 66 |path/fil|ename of|
|00002e90| 20 74 68 65 20 66 6f 6e | 74 2e 0d 0a 20 20 20 0d | the fon|t... .|
|00002ea0| 0a 45 78 61 6d 70 6c 65 | 3a 0d 0a 20 20 0d 0a 20 |.Example|:.. .. |
|00002eb0| 20 6c 6f 61 64 63 75 72 | 73 28 22 6d 6f 75 63 75 | loadcur|s("moucu|
|00002ec0| 72 73 2e 66 6e 74 22 29 | 3b 0d 0a 20 20 0d 0a 20 |rs.fnt")|;.. .. |
|00002ed0| 20 54 68 69 73 20 6c 6f | 61 64 73 20 74 68 65 20 | This lo|ads the |
|00002ee0| 66 69 72 73 74 20 33 32 | 20 63 68 61 72 61 63 74 |first 32| charact|
|00002ef0| 65 72 73 20 69 6e 74 6f | 20 74 68 65 20 6d 6f 75 |ers into| the mou|
|00002f00| 73 65 20 63 75 72 73 6f | 72 20 62 75 66 66 20 6f |se curso|r buff o|
|00002f10| 66 20 66 69 6c 65 0d 0a | 20 20 6d 6f 75 63 75 72 |f file..| moucur|
|00002f20| 73 2e 66 6e 74 2e 0d 0a | 20 20 4d 6f 75 5f 67 65 |s.fnt...| Mou_ge|
|00002f30| 74 5f 61 64 61 70 74 65 | 72 28 29 20 64 65 74 65 |t_adapte|r() dete|
|00002f40| 63 74 73 20 69 66 20 79 | 6f 75 20 61 72 65 20 72 |cts if y|ou are r|
|00002f50| 75 6e 6e 69 6e 67 20 45 | 47 41 20 6f 72 20 56 47 |unning E|GA or VG|
|00002f60| 41 2e 20 49 74 20 72 65 | 74 75 72 6e 73 20 39 20 |A. It re|turns 9 |
|00002f70| 69 66 0d 0a 56 47 41 2c | 20 33 20 69 66 20 45 47 |if..VGA,| 3 if EG|
|00002f80| 41 2c 20 61 6e 64 20 30 | 20 66 6f 72 20 61 6c 6c |A, and 0| for all|
|00002f90| 20 6f 74 68 65 72 20 61 | 64 61 70 74 65 72 73 2e | other a|dapters.|
|00002fa0| 20 49 74 20 73 65 74 73 | 20 74 68 65 20 6d 61 78 | It sets| the max|
|00002fb0| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 0d 0a 66 6f | coordin|ates..fo|
|00002fc0| 72 20 74 68 65 20 76 69 | 64 65 6f 20 6d 6f 64 65 |r the vi|deo mode|
|00002fd0| 20 79 6f 75 20 61 72 65 | 20 69 6e 2e 0d 0a 20 20 | you are| in... |
|00002fe0| 0d 0a 45 78 61 6d 70 6c | 65 3a 0d 0a 20 20 0d 0a |..Exampl|e:.. ..|
|00002ff0| 20 20 69 6e 74 20 61 64 | 61 70 74 65 72 3b 0d 0a | int ad|apter;..|
|00003000| 20 20 0d 0a 20 20 61 64 | 61 70 74 65 72 20 3d 20 | .. ad|apter = |
|00003010| 6d 6f 75 5f 67 65 74 5f | 61 64 61 70 74 65 72 28 |mou_get_|adapter(|
|00003020| 29 3b 0d 0a 20 20 0d 0a | 20 20 54 68 69 73 20 77 |);.. ..| This w|
|00003030| 69 6c 6c 20 72 65 74 75 | 72 6e 20 74 68 65 20 56 |ill retu|rn the V|
|00003040| 49 44 45 4f 20 61 64 61 | 70 74 65 72 20 63 6f 64 |IDEO ada|pter cod|
|00003050| 65 20 69 6e 74 6f 20 61 | 64 61 70 74 65 72 2e 0d |e into a|dapter..|
|00003060| 0a 20 20 4d 6f 75 69 6e | 69 74 28 29 20 73 65 74 |. Mouin|it() set|
|00003070| 73 20 61 6c 6c 20 6d 65 | 6d 6f 72 79 20 61 64 64 |s all me|mory add|
|00003080| 72 65 73 73 65 73 2e 0d | 0a 20 20 0d 0a 45 78 61 |resses..|. ..Exa|
|00003090| 6d 70 6c 65 3a 0d 0a 20 | 20 0d 0a 20 20 6d 6f 75 |mple:.. | .. mou|
|000030a0| 69 6e 69 74 28 29 3b 0d | 0a 20 20 0d 0a 20 20 54 |init();.|. .. T|
|000030b0| 68 69 73 20 77 69 6c 6c | 20 69 6e 69 74 69 61 6c |his will| initial|
|000030c0| 69 7a 65 20 74 68 65 20 | 6d 6f 75 73 65 20 66 75 |ize the |mouse fu|
|000030d0| 6e 63 74 69 6f 6e 73 20 | 74 6f 20 72 75 6e 20 69 |nctions |to run i|
|000030e0| 6e 20 64 75 61 6c 20 66 | 6f 6e 74 20 6d 6f 64 65 |n dual f|ont mode|
|000030f0| 2e 20 0d 0a 20 20 4d 6f | 75 75 6e 69 6e 69 74 28 |. .. Mo|uuninit(|
|00003100| 29 20 73 68 6f 75 6c 64 | 20 62 65 20 63 61 6c 6c |) should| be call|
|00003110| 65 64 20 77 68 65 6e 20 | 65 78 69 74 69 6e 67 20 |ed when |exiting |
|00003120| 61 66 74 65 72 20 74 68 | 69 73 20 63 61 6c 6c 2e |after th|is call.|
|00003130| 0d 0a 20 20 4d 6f 75 75 | 6e 69 6e 69 74 28 29 20 |.. Mouu|ninit() |
|00003140| 66 72 65 65 73 20 6d 65 | 6d 6f 72 79 20 61 6c 6c |frees me|mory all|
|00003150| 6f 63 61 74 65 64 20 77 | 69 74 68 20 6d 6f 75 69 |ocated w|ith moui|
|00003160| 6e 69 74 28 29 2e 0d 0a | 20 20 20 0d 0a 45 78 61 |nit()...| ..Exa|
|00003170| 6d 70 6c 65 3a 0d 0a 20 | 20 0d 0a 20 20 6d 6f 75 |mple:.. | .. mou|
|00003180| 75 6e 69 6e 69 74 28 29 | 3b 0d 0a 20 20 0d 0a 20 |uninit()|;.. .. |
|00003190| 20 54 68 69 73 20 77 69 | 6c 6c 20 66 72 65 65 20 | This wi|ll free |
|000031a0| 6d 65 6d 6f 72 79 20 75 | 73 65 64 20 69 6e 20 6d |memory u|sed in m|
|000031b0| 6f 75 73 65 20 66 75 6e | 63 74 69 6f 6e 73 20 61 |ouse fun|ctions a|
|000031c0| 6e 64 20 73 68 6f 75 6c | 64 20 62 65 20 63 61 6c |nd shoul|d be cal|
|000031d0| 6c 65 64 20 77 68 65 6e | 0d 0a 20 20 65 78 69 74 |led when|.. exit|
|000031e0| 69 6e 67 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |ing the |program |
|000031f0| 69 66 20 6d 6f 75 69 6e | 69 74 28 29 20 69 73 20 |if mouin|it() is |
|00003200| 75 73 65 64 2e 0d 0a 20 | 20 4d 6f 75 70 6f 73 69 |used... | Mouposi|
|00003210| 74 69 6f 6e 28 29 20 72 | 65 74 75 72 6e 73 20 74 |tion() r|eturns t|
|00003220| 68 65 20 63 75 72 72 65 | 6e 74 20 6d 6f 75 73 65 |he curre|nt mouse|
|00003230| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 20 69 6e 20 | coordin|ates in |
|00003240| 74 65 78 74 20 67 72 61 | 70 68 69 63 20 58 2c 59 |text gra|phic X,Y|
|00003250| 0d 0a 63 6f 6f 72 64 69 | 6e 61 74 65 73 20 69 6e |..coordi|nates in|
|00003260| 20 69 6e 74 20 70 6f 69 | 6e 74 65 72 73 20 58 2c | int poi|nters X,|
|00003270| 59 20 61 6e 64 20 69 66 | 20 63 68 61 6e 67 65 64 |Y and if| changed|
|00003280| 20 73 69 6e 63 65 20 6c | 61 73 74 65 64 20 63 68 | since l|asted ch|
|00003290| 65 63 6b 65 64 20 31 2c | 20 65 6c 73 65 0d 0a 69 |ecked 1,| else..i|
|000032a0| 66 20 6e 6f 20 63 68 61 | 6e 67 65 20 30 2e 0d 0a |f no cha|nge 0...|
|000032b0| 20 20 0d 0a 45 78 61 6d | 70 6c 65 3a 0d 0a 20 20 | ..Exam|ple:.. |
|000032c0| 0d 0a 20 20 69 6e 74 20 | 78 2c 79 2c 63 68 61 6e |.. int |x,y,chan|
|000032d0| 67 65 64 3b 0d 0a 20 20 | 20 0d 0a 20 20 63 68 61 |ged;.. | .. cha|
|000032e0| 6e 67 65 64 20 3d 20 6d | 6f 75 70 6f 73 69 74 69 |nged = m|oupositi|
|000032f0| 6f 6e 28 26 78 2c 26 79 | 29 3b 0d 0a 20 20 20 20 |on(&x,&y|);.. |
|00003300| 0d 0a 20 20 54 68 69 73 | 20 77 69 6c 6c 20 72 65 |.. This| will re|
|00003310| 74 75 72 6e 20 74 68 65 | 20 63 75 72 72 65 6e 74 |turn the| current|
|00003320| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 20 69 6e 74 | coordin|ates int|
|00003330| 6f 20 58 20 61 6e 64 20 | 59 20 61 6e 64 20 69 66 |o X and |Y and if|
|00003340| 20 63 68 61 6e 67 65 64 | 20 20 20 0d 0a 20 20 73 | changed| .. s|
|00003350| 69 6e 63 65 20 6c 61 73 | 74 65 64 20 63 68 65 63 |ince las|ted chec|
|00003360| 6b 65 64 20 73 65 74 20 | 63 68 61 6e 67 65 64 20 |ked set |changed |
|00003370| 74 6f 20 31 3b 0d 0a 20 | 20 4d 6f 75 70 6f 73 69 |to 1;.. | Mouposi|
|00003380| 74 69 6f 6e 70 69 78 28 | 29 20 69 73 20 74 68 65 |tionpix(|) is the|
|00003390| 20 73 61 6d 65 20 61 73 | 20 6d 6f 75 70 6f 73 69 | same as| mouposi|
|000033a0| 74 69 6f 6e 28 29 20 62 | 75 74 20 72 65 74 75 72 |tion() b|ut retur|
|000033b0| 6e 73 20 74 68 65 20 63 | 75 72 72 65 6e 74 0d 0a |ns the c|urrent..|
|000033c0| 63 6f 6f 72 64 69 6e 61 | 74 65 73 20 69 6e 20 70 |coordina|tes in p|
|000033d0| 69 78 65 6c 73 2e 0d 0a | 20 20 0d 0a 45 78 61 6d |ixels...| ..Exam|
|000033e0| 70 6c 65 3a 0d 0a 20 20 | 0d 0a 20 20 69 6e 74 20 |ple:.. |.. int |
|000033f0| 70 69 78 5f 78 2c 70 69 | 78 5f 79 2c 63 68 61 6e |pix_x,pi|x_y,chan|
|00003400| 67 65 64 3b 0d 0a 20 20 | 20 20 0d 0a 20 20 63 68 |ged;.. | .. ch|
|00003410| 61 6e 67 65 64 20 3d 20 | 6d 6f 75 70 6f 73 69 74 |anged = |mouposit|
|00003420| 69 6f 6e 70 69 78 28 26 | 70 69 78 5f 78 2c 26 70 |ionpix(&|pix_x,&p|
|00003430| 69 78 5f 79 29 3b 0d 0a | 20 20 0d 0a 20 20 54 68 |ix_y);..| .. Th|
|00003440| 69 73 20 72 65 74 75 72 | 6e 73 20 74 68 65 20 63 |is retur|ns the c|
|00003450| 75 72 72 65 6e 74 20 63 | 6f 6f 72 64 69 6e 61 74 |urrent c|oordinat|
|00003460| 65 73 20 69 6e 74 6f 20 | 70 69 78 5f 78 20 61 6e |es into |pix_x an|
|00003470| 64 20 70 69 78 5f 79 20 | 61 64 20 69 66 20 63 68 |d pix_y |ad if ch|
|00003480| 61 6e 67 65 64 0d 0a 20 | 20 73 69 6e 63 65 20 6c |anged.. | since l|
|00003490| 61 73 74 65 64 20 63 68 | 65 63 6b 65 64 20 73 65 |asted ch|ecked se|
|000034a0| 74 73 20 63 68 61 6e 67 | 65 64 20 74 6f 20 31 2e |ts chang|ed to 1.|
|000034b0| 0d 0a 20 20 4c 6f 61 64 | 66 6f 6e 74 2e 65 78 65 |.. Load|font.exe|
|000034c0| 20 77 69 6c 6c 20 6c 6f | 61 64 20 61 20 73 70 65 | will lo|ad a spe|
|000034d0| 63 69 66 69 65 64 20 66 | 6f 6e 74 20 69 6e 74 20 |cified f|ont int |
|000034e0| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 62 61 |the spec|ified ba|
|000034f0| 6e 6b 2e 0d 0a 20 20 0d | 0a 20 20 45 78 61 6d 70 |nk... .|. Examp|
|00003500| 6c 65 3a 0d 0a 20 20 0d | 0a 20 20 20 20 73 79 73 |le:.. .|. sys|
|00003510| 74 65 6d 28 22 6c 6f 61 | 64 66 6f 6e 74 20 73 63 |tem("loa|dfont sc|
|00003520| 72 69 70 74 2e 66 6e 74 | 20 31 29 3b 0d 0a 20 20 |ript.fnt| 1);.. |
|00003530| 20 20 0d 0a 20 20 20 20 | 54 68 69 73 20 77 69 6c | .. |This wil|
|00003540| 6c 20 61 73 20 61 20 63 | 68 69 6c 64 20 6c 6f 61 |l as a c|hild loa|
|00003550| 64 20 74 68 65 20 73 63 | 72 69 70 74 20 66 6f 6e |d the sc|ript fon|
|00003560| 74 20 69 6e 74 6f 20 74 | 68 65 20 68 69 67 68 20 |t into t|he high |
|00003570| 62 61 6e 6b 2e 0d 0a 20 | 20 44 75 61 6c 6f 6e 2e |bank... | Dualon.|
|00003580| 65 78 65 20 77 69 6c 6c | 20 74 75 72 6e 20 74 68 |exe will| turn th|
|00003590| 65 20 64 75 61 6c 20 66 | 6f 6e 74 73 20 6f 6e 20 |e dual f|onts on |
|000035a0| 61 6e 64 20 6f 66 66 2e | 0d 0a 20 20 0d 0a 20 20 |and off.|.. .. |
|000035b0| 45 78 61 6d 70 6c 65 3a | 0d 0a 20 20 0d 0a 20 20 |Example:|.. .. |
|000035c0| 73 79 73 74 65 6d 28 22 | 64 75 61 6c 6f 6e 20 31 |system("|dualon 1|
|000035d0| 29 3b 0d 0a 20 20 0d 0a | 20 20 54 68 69 73 20 63 |);.. ..| This c|
|000035e0| 68 69 6c 64 20 63 61 6c | 6c 20 77 69 6c 6c 20 65 |hild cal|l will e|
|000035f0| 6e 61 62 6c 65 20 74 68 | 65 20 64 75 61 6c 20 66 |nable th|e dual f|
|00003600| 6f 6e 74 20 6d 6f 64 65 | 20 28 30 20 66 6f 72 20 |ont mode| (0 for |
|00003610| 6f 66 66 29 2e 0d 0a 20 | 20 53 65 74 70 61 6c 2e |off)... | Setpal.|
|00003620| 65 78 65 20 77 69 6c 6c | 20 73 65 74 20 61 20 70 |exe will| set a p|
|00003630| 61 6c 65 74 74 65 20 72 | 65 67 69 73 74 65 72 20 |alette r|egister |
|00003640| 74 6f 20 61 20 63 6f 6c | 6f 72 2e 0d 0a 20 20 20 |to a col|or... |
|00003650| 0d 0a 20 20 45 78 61 6d | 70 6c 65 3a 0d 0a 20 20 |.. Exam|ple:.. |
|00003660| 0d 0a 20 20 73 79 73 74 | 65 6d 28 22 73 65 74 70 |.. syst|em("setp|
|00003670| 61 6c 20 32 20 36 33 29 | 3b 0d 0a 20 20 0d 0a 20 |al 2 63)|;.. .. |
|00003680| 20 54 68 69 73 20 63 61 | 6c 6c 20 77 69 6c 6c 20 | This ca|ll will |
|00003690| 73 65 74 20 74 68 65 20 | 70 61 6c 65 74 74 65 20 |set the |palette |
|000036a0| 32 20 28 67 72 65 65 6e | 29 20 74 6f 20 74 68 65 |2 (green|) to the|
|000036b0| 20 63 6f 6c 6f 72 20 77 | 68 69 74 65 2e 0d 0a 20 | color w|hite... |
|000036c0| 20 4d 61 6b 65 66 6f 6e | 74 2e 65 78 65 20 77 69 | Makefon|t.exe wi|
|000036d0| 6c 6c 20 63 72 65 61 74 | 65 20 61 20 6d 75 6c 74 |ll creat|e a mult|
|000036e0| 69 20 66 6f 6e 74 2e 0d | 0a 20 20 0d 0a 20 20 45 |i font..|. .. E|
|000036f0| 78 61 6d 70 6c 65 0d 0a | 20 20 0d 0a 20 20 63 3a |xample..| .. c:|
|00003700| 5c 74 63 5c 6d 61 6b 65 | 66 6f 6e 74 20 69 62 6d |\tc\make|font ibm|
|00003710| 73 74 64 2e 66 6e 74 20 | 73 63 72 69 70 74 2e 66 |std.fnt |script.f|
|00003720| 6e 74 20 6d 75 6c 74 69 | 31 2e 66 6e 74 0d 0a 20 |nt multi|1.fnt.. |
|00003730| 20 0d 0a 20 20 54 68 69 | 73 20 63 6f 6d 6d 61 6e | .. Thi|s comman|
|00003740| 64 20 61 74 20 74 68 65 | 20 70 72 6f 6d 70 74 20 |d at the| prompt |
|00003750| 77 69 6c 6c 20 6d 61 6b | 65 20 61 20 6d 75 6c 74 |will mak|e a mult|
|00003760| 69 20 66 6f 6e 74 20 6f | 66 20 74 68 65 20 69 62 |i font o|f the ib|
|00003770| 6d 73 74 64 20 66 6f 6e | 74 0d 0a 20 20 61 6e 64 |mstd fon|t.. and|
|00003780| 20 74 68 65 20 73 63 72 | 69 70 74 20 66 6f 6e 74 | the scr|ipt font|
|00003790| 20 61 6e 64 20 63 61 6c | 6c 20 69 74 20 6d 75 6c | and cal|l it mul|
|000037a0| 74 69 31 2e 66 6e 74 2e | 20 54 68 65 20 69 62 6d |ti1.fnt.| The ibm|
|000037b0| 73 74 64 20 66 6f 6e 74 | 20 74 68 65 20 6f 64 64 |std font| the odd|
|000037c0| 0d 0a 20 20 63 61 6c 6c | 20 61 6e 64 20 74 68 65 |.. call| and the|
|000037d0| 20 73 63 72 69 70 74 20 | 66 6f 6e 74 20 74 68 65 | script |font the|
|000037e0| 20 65 76 65 6e 20 63 61 | 6c 6c 20 77 69 74 68 20 | even ca|ll with |
|000037f0| 74 68 65 20 6d 75 6c 74 | 69 20 77 69 6e 20 77 72 |the mult|i win wr|
|00003800| 69 74 65 73 2e 0d 0a 20 | 20 52 65 73 65 74 70 61 |ites... | Resetpa|
|00003810| 6c 2e 65 78 65 20 65 6e | 61 62 6c 65 73 20 6f 72 |l.exe en|ables or|
|00003820| 20 64 69 73 61 62 6c 65 | 73 20 74 68 65 20 63 6f | disable|s the co|
|00003830| 6c 6f 72 20 70 61 6c 65 | 74 74 65 20 72 65 73 65 |lor pale|tte rese|
|00003840| 74 20 77 69 74 68 20 61 | 20 76 69 64 65 6f 0d 0a |t with a| video..|
|00003850| 6d 6f 64 65 20 63 68 61 | 6e 67 65 20 6f 72 20 72 |mode cha|nge or r|
|00003860| 65 73 65 74 2e 20 31 20 | 64 69 73 61 62 6c 65 73 |eset. 1 |disables|
|00003870| 20 72 65 73 65 74 20 30 | 20 28 64 65 66 61 75 6c | reset 0| (defaul|
|00003880| 74 29 20 65 6e 61 62 6c | 65 73 20 72 65 73 65 74 |t) enabl|es reset|
|00003890| 2e 0d 0a 20 20 0d 0a 45 | 78 61 6d 70 6c 65 3a 0d |... ..E|xample:.|
|000038a0| 0a 20 20 20 0d 0a 20 20 | 20 73 79 73 74 65 6d 28 |. .. | system(|
|000038b0| 22 72 65 73 65 74 70 61 | 6c 20 31 22 29 3b 0d 0a |"resetpa|l 1");..|
|000038c0| 20 20 20 0d 0a 20 20 20 | 54 68 69 73 20 64 69 73 | .. |This dis|
|000038d0| 61 62 6c 65 73 20 74 68 | 65 20 70 61 6c 65 74 74 |ables th|e palett|
|000038e0| 65 20 72 65 73 65 74 20 | 77 69 74 68 20 61 20 76 |e reset |with a v|
|000038f0| 69 64 65 6f 20 6d 6f 64 | 65 20 63 68 61 6e 67 65 |ideo mod|e change|
|00003900| 2e 0d 0a 20 20 53 61 76 | 65 64 61 63 2e 65 78 65 |... Sav|edac.exe|
|00003910| 20 68 61 73 20 6f 6e 6c | 79 20 6f 6e 65 20 61 72 | has onl|y one ar|
|00003920| 67 75 6d 65 6e 74 2c 20 | 74 68 65 20 70 61 74 68 |gument, |the path|
|00003930| 20 61 6e 64 20 6e 61 6d | 65 20 6f 66 20 74 68 65 | and nam|e of the|
|00003940| 20 66 69 6c 65 20 74 6f | 20 73 61 76 65 20 0d 0a | file to| save ..|
|00003950| 74 6f 2e 20 49 66 20 74 | 68 65 20 66 69 6c 65 20 |to. If t|he file |
|00003960| 64 6f 73 65 20 6e 6f 74 | 20 65 78 69 73 74 20 69 |dose not| exist i|
|00003970| 74 20 77 69 6c 6c 20 62 | 65 20 63 72 65 61 74 65 |t will b|e create|
|00003980| 64 2e 0d 0a 20 20 0d 0a | 45 78 61 6d 70 6c 65 3a |d... ..|Example:|
|00003990| 0d 0a 20 20 20 20 0d 0a | 20 20 73 79 73 74 65 6d |.. ..| system|
|000039a0| 28 22 73 61 76 65 64 61 | 63 20 74 65 73 74 2e 64 |("saveda|c test.d|
|000039b0| 61 63 22 29 3b 0d 0a 20 | 20 0d 0a 20 20 54 68 69 |ac");.. | .. Thi|
|000039c0| 73 20 77 69 6c 6c 20 75 | 73 65 20 61 20 73 79 73 |s will u|se a sys|
|000039d0| 74 65 6d 20 63 61 6c 6c | 20 74 6f 20 73 61 76 65 |tem call| to save|
|000039e0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 44 41 43 | the cur|rent DAC|
|000039f0| 20 72 65 67 69 73 74 65 | 72 73 20 74 6f 20 61 20 | registe|rs to a |
|00003a00| 66 69 6c 65 0d 0a 20 20 | 63 61 6c 6c 65 64 20 54 |file.. |called T|
|00003a10| 45 53 54 2e 44 41 43 2e | 0d 0a 20 20 4c 6f 61 64 |EST.DAC.|.. Load|
|00003a20| 64 61 63 2e 65 78 65 20 | 77 69 6c 6c 20 6c 6f 61 |dac.exe |will loa|
|00003a30| 64 20 74 68 65 20 44 41 | 43 20 72 65 67 69 73 74 |d the DA|C regist|
|00003a40| 65 72 73 20 77 69 74 68 | 20 64 61 74 61 20 66 72 |ers with| data fr|
|00003a50| 6f 6d 20 61 20 63 68 6f | 73 65 6e 20 66 69 6c 65 |om a cho|sen file|
|00003a60| 2e 0d 0a 20 20 0d 0a 45 | 78 61 6d 70 6c 65 3a 0d |... ..E|xample:.|
|00003a70| 0a 20 20 0d 0a 20 20 73 | 79 73 74 65 6d 28 22 6c |. .. s|ystem("l|
|00003a80| 6f 61 64 64 61 63 20 74 | 65 73 74 2e 64 61 63 22 |oaddac t|est.dac"|
|00003a90| 29 3b 0d 0a 20 20 0d 0a | 20 20 54 68 69 73 20 77 |);.. ..| This w|
|00003aa0| 69 6c 6c 20 6c 6f 61 64 | 20 74 68 65 20 44 41 43 |ill load| the DAC|
|00003ab0| 20 72 65 67 69 73 74 65 | 72 73 20 77 69 74 68 20 | registe|rs with |
|00003ac0| 74 68 65 20 63 6f 6c 6f | 72 20 64 61 74 61 20 69 |the colo|r data i|
|00003ad0| 6e 20 66 69 6c 65 20 74 | 65 73 74 2e 64 61 63 2e |n file t|est.dac.|
|00003ae0| 0d 0a 20 20 53 61 76 65 | 70 61 6c 2e 65 78 65 20 |.. Save|pal.exe |
|00003af0| 77 69 6c 6c 20 73 61 76 | 65 20 74 68 65 20 70 61 |will sav|e the pa|
|00003b00| 6c 65 74 74 65 20 72 65 | 67 69 73 74 65 72 20 64 |lette re|gister d|
|00003b10| 61 74 61 20 74 6f 20 61 | 20 73 65 6c 65 63 74 65 |ata to a| selecte|
|00003b20| 64 20 66 69 6c 65 2e 0d | 0a 20 20 0d 0a 45 78 61 |d file..|. ..Exa|
|00003b30| 6d 70 6c 65 3a 0d 0a 20 | 20 0d 0a 20 20 73 79 73 |mple:.. | .. sys|
|00003b40| 74 65 6d 28 22 73 61 76 | 65 70 61 6c 20 74 65 73 |tem("sav|epal tes|
|00003b50| 74 2e 70 61 6c 22 29 3b | 0d 0a 20 20 0d 0a 20 20 |t.pal");|.. .. |
|00003b60| 54 68 69 73 20 77 69 6c | 6c 20 73 61 76 65 20 74 |This wil|l save t|
|00003b70| 68 65 20 70 61 6c 65 74 | 74 65 20 64 61 74 61 20 |he palet|te data |
|00003b80| 74 6f 20 74 68 65 20 66 | 69 6c 65 20 54 45 53 54 |to the f|ile TEST|
|00003b90| 2e 50 41 4c 2e 0d 0a 20 | 20 4c 6f 61 64 70 61 6c |.PAL... | Loadpal|
|00003ba0| 2e 65 78 65 20 6c 6f 61 | 64 20 74 68 65 20 70 61 |.exe loa|d the pa|
|00003bb0| 6c 65 74 74 65 20 72 65 | 67 69 73 74 65 72 73 20 |lette re|gisters |
|00003bc0| 77 69 74 68 20 64 61 74 | 61 20 66 72 6f 6d 20 61 |with dat|a from a|
|00003bd0| 20 73 65 6c 65 63 74 65 | 64 20 66 69 6c 65 2e 0d | selecte|d file..|
|00003be0| 0a 20 20 0d 0a 45 78 61 | 6d 70 6c 65 3a 0d 0a 20 |. ..Exa|mple:.. |
|00003bf0| 20 0d 0a 20 20 73 79 73 | 74 65 6d 28 22 6c 6f 61 | .. sys|tem("loa|
|00003c00| 64 70 61 6c 20 74 65 73 | 74 2e 70 61 6c 22 29 3b |dpal tes|t.pal");|
|00003c10| 0d 0a 20 20 0d 0a 20 20 | 54 68 69 73 20 75 73 65 |.. .. |This use|
|00003c20| 73 20 61 20 73 79 73 74 | 65 6d 20 63 61 6c 6c 20 |s a syst|em call |
|00003c30| 74 6f 20 6c 6f 61 64 20 | 74 68 65 20 70 61 6c 65 |to load |the pale|
|00003c40| 74 74 65 20 66 72 6f 6d | 20 66 69 6c 65 20 74 65 |tte from| file te|
|00003c50| 73 74 2e 70 61 6c 2e 0d | 0a 20 20 52 65 73 65 74 |st.pal..|. Reset|
|00003c60| 70 61 6c 2e 65 78 65 20 | 77 69 6c 6c 20 65 6e 61 |pal.exe |will ena|
|00003c70| 62 6c 65 20 6f 72 20 64 | 69 73 61 62 6c 65 20 74 |ble or d|isable t|
|00003c80| 68 65 20 64 65 66 61 75 | 6c 74 20 70 61 6c 65 74 |he defau|lt palet|
|00003c90| 74 65 20 72 65 73 65 74 | 20 77 69 74 68 20 61 20 |te reset| with a |
|00003ca0| 76 69 64 65 6f 0d 0a 6d | 6f 64 65 20 63 68 61 6e |video..m|ode chan|
|00003cb0| 67 65 2e 20 31 20 64 69 | 73 61 62 6c 65 73 20 72 |ge. 1 di|sables r|
|00003cc0| 65 73 65 74 20 30 20 65 | 6e 61 62 6c 65 73 20 72 |eset 0 e|nables r|
|00003cd0| 65 73 65 74 2e 0d 0a 20 | 20 0d 0a 45 78 61 6d 70 |eset... | ..Examp|
|00003ce0| 6c 65 3a 0d 0a 20 20 0d | 0a 20 20 20 73 79 73 74 |le:.. .|. syst|
|00003cf0| 65 6d 28 22 72 65 73 65 | 74 70 61 6c 20 30 22 29 |em("rese|tpal 0")|
|00003d00| 3b 0d 0a 20 20 20 0d 0a | 20 20 20 54 68 69 73 20 |;.. ..| This |
|00003d10| 77 69 6c 6c 20 6c 65 74 | 20 74 68 65 20 70 61 6c |will let| the pal|
|00003d20| 65 74 74 65 20 72 65 73 | 65 74 20 74 6f 20 64 65 |ette res|et to de|
|00003d30| 66 61 75 6c 74 20 63 6f | 6c 6f 72 73 20 6f 6e 20 |fault co|lors on |
|00003d40| 61 20 76 69 64 65 6f 20 | 6d 6f 64 65 20 63 68 61 |a video |mode cha|
|00003d50| 6e 67 65 2e 0d 0a | |nge... | |
+--------+-------------------------+-------------------------+--------+--------+